1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=x86_64-pc-linux < %s | FileCheck %s
3 ; RUN: llc -O3 -mtriple=x86_64-pc-linux -mattr=+avx < %s | FileCheck %s --check-prefix=AVX --check-prefix=AVX1
4 ; RUN: llc -O3 -mtriple=x86_64-pc-linux -mattr=+avx512f < %s | FileCheck %s --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512F
5 ; RUN: llc -O3 -mtriple=x86_64-pc-linux -mattr=+avx512dq < %s | FileCheck %s --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512DQ
7 define <1 x float> @constrained_vector_fdiv_v1f32() #0 {
8 ; CHECK-LABEL: constrained_vector_fdiv_v1f32:
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
11 ; CHECK-NEXT: divss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
14 ; AVX-LABEL: constrained_vector_fdiv_v1f32:
15 ; AVX: # %bb.0: # %entry
16 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
17 ; AVX-NEXT: vdivss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
20 %div = call <1 x float> @llvm.experimental.constrained.fdiv.v1f32(
21 <1 x float> <float 1.000000e+00>,
22 <1 x float> <float 1.000000e+01>,
23 metadata !"round.dynamic",
24 metadata !"fpexcept.strict") #0
28 define <2 x double> @constrained_vector_fdiv_v2f64() #0 {
29 ; CHECK-LABEL: constrained_vector_fdiv_v2f64:
30 ; CHECK: # %bb.0: # %entry
31 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
32 ; CHECK-NEXT: divpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
35 ; AVX-LABEL: constrained_vector_fdiv_v2f64:
36 ; AVX: # %bb.0: # %entry
37 ; AVX-NEXT: vmovapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
38 ; AVX-NEXT: vdivpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
41 %div = call <2 x double> @llvm.experimental.constrained.fdiv.v2f64(
42 <2 x double> <double 1.000000e+00, double 2.000000e+00>,
43 <2 x double> <double 1.000000e+01, double 1.000000e+01>,
44 metadata !"round.dynamic",
45 metadata !"fpexcept.strict") #0
49 define <3 x float> @constrained_vector_fdiv_v3f32() #0 {
50 ; CHECK-LABEL: constrained_vector_fdiv_v3f32:
51 ; CHECK: # %bb.0: # %entry
52 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
53 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
54 ; CHECK-NEXT: divss %xmm1, %xmm2
55 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
56 ; CHECK-NEXT: divss %xmm1, %xmm0
57 ; CHECK-NEXT: movss {{.*#+}} xmm3 = mem[0],zero,zero,zero
58 ; CHECK-NEXT: divss %xmm1, %xmm3
59 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
60 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
63 ; AVX-LABEL: constrained_vector_fdiv_v3f32:
64 ; AVX: # %bb.0: # %entry
65 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
66 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
67 ; AVX-NEXT: vdivss %xmm0, %xmm1, %xmm1
68 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
69 ; AVX-NEXT: vdivss %xmm0, %xmm2, %xmm2
70 ; AVX-NEXT: vmovss {{.*#+}} xmm3 = mem[0],zero,zero,zero
71 ; AVX-NEXT: vdivss %xmm0, %xmm3, %xmm0
72 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm2[0],xmm0[0],xmm2[2,3]
73 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm1[0],xmm0[3]
76 %div = call <3 x float> @llvm.experimental.constrained.fdiv.v3f32(
77 <3 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>,
78 <3 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>,
79 metadata !"round.dynamic",
80 metadata !"fpexcept.strict") #0
84 define <3 x double> @constrained_vector_fdiv_v3f64() #0 {
85 ; CHECK-LABEL: constrained_vector_fdiv_v3f64:
86 ; CHECK: # %bb.0: # %entry
87 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
88 ; CHECK-NEXT: divpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
89 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
90 ; CHECK-NEXT: divsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
91 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
92 ; CHECK-NEXT: movapd %xmm0, %xmm1
93 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
94 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
98 ; AVX-LABEL: constrained_vector_fdiv_v3f64:
99 ; AVX: # %bb.0: # %entry
100 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
101 ; AVX-NEXT: vdivsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
102 ; AVX-NEXT: vmovapd {{.*#+}} xmm1 = [1.0E+0,2.0E+0]
103 ; AVX-NEXT: vdivpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
104 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
107 %div = call <3 x double> @llvm.experimental.constrained.fdiv.v3f64(
108 <3 x double> <double 1.000000e+00, double 2.000000e+00, double 3.000000e+00>,
109 <3 x double> <double 1.000000e+01, double 1.000000e+01, double 1.000000e+01>,
110 metadata !"round.dynamic",
111 metadata !"fpexcept.strict") #0
112 ret <3 x double> %div
115 define <4 x double> @constrained_vector_fdiv_v4f64() #0 {
116 ; CHECK-LABEL: constrained_vector_fdiv_v4f64:
117 ; CHECK: # %bb.0: # %entry
118 ; CHECK-NEXT: movapd {{.*#+}} xmm2 = [1.0E+1,1.0E+1]
119 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [3.0E+0,4.0E+0]
120 ; CHECK-NEXT: divpd %xmm2, %xmm1
121 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
122 ; CHECK-NEXT: divpd %xmm2, %xmm0
125 ; AVX1-LABEL: constrained_vector_fdiv_v4f64:
126 ; AVX1: # %bb.0: # %entry
127 ; AVX1-NEXT: vmovapd {{.*#+}} ymm0 = [1.0E+0,2.0E+0,3.0E+0,4.0E+0]
128 ; AVX1-NEXT: vdivpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
131 ; AVX512-LABEL: constrained_vector_fdiv_v4f64:
132 ; AVX512: # %bb.0: # %entry
133 ; AVX512-NEXT: vbroadcastsd {{.*#+}} ymm0 = [1.0E+1,1.0E+1,1.0E+1,1.0E+1]
134 ; AVX512-NEXT: vmovapd {{.*#+}} ymm1 = [1.0E+0,2.0E+0,3.0E+0,4.0E+0]
135 ; AVX512-NEXT: vdivpd %ymm0, %ymm1, %ymm0
138 %div = call <4 x double> @llvm.experimental.constrained.fdiv.v4f64(
139 <4 x double> <double 1.000000e+00, double 2.000000e+00,
140 double 3.000000e+00, double 4.000000e+00>,
141 <4 x double> <double 1.000000e+01, double 1.000000e+01,
142 double 1.000000e+01, double 1.000000e+01>,
143 metadata !"round.dynamic",
144 metadata !"fpexcept.strict") #0
145 ret <4 x double> %div
148 define <1 x float> @constrained_vector_frem_v1f32() #0 {
149 ; CHECK-LABEL: constrained_vector_frem_v1f32:
150 ; CHECK: # %bb.0: # %entry
151 ; CHECK-NEXT: pushq %rax
152 ; CHECK-NEXT: .cfi_def_cfa_offset 16
153 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
154 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
155 ; CHECK-NEXT: callq fmodf@PLT
156 ; CHECK-NEXT: popq %rax
157 ; CHECK-NEXT: .cfi_def_cfa_offset 8
160 ; AVX-LABEL: constrained_vector_frem_v1f32:
161 ; AVX: # %bb.0: # %entry
162 ; AVX-NEXT: pushq %rax
163 ; AVX-NEXT: .cfi_def_cfa_offset 16
164 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
165 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
166 ; AVX-NEXT: callq fmodf@PLT
167 ; AVX-NEXT: popq %rax
168 ; AVX-NEXT: .cfi_def_cfa_offset 8
171 %rem = call <1 x float> @llvm.experimental.constrained.frem.v1f32(
172 <1 x float> <float 1.000000e+00>,
173 <1 x float> <float 1.000000e+01>,
174 metadata !"round.dynamic",
175 metadata !"fpexcept.strict") #0
179 define <2 x double> @constrained_vector_frem_v2f64() #0 {
180 ; CHECK-LABEL: constrained_vector_frem_v2f64:
181 ; CHECK: # %bb.0: # %entry
182 ; CHECK-NEXT: subq $24, %rsp
183 ; CHECK-NEXT: .cfi_def_cfa_offset 32
184 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
185 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
186 ; CHECK-NEXT: callq fmod@PLT
187 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
188 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
189 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
190 ; CHECK-NEXT: callq fmod@PLT
191 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
192 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
193 ; CHECK-NEXT: addq $24, %rsp
194 ; CHECK-NEXT: .cfi_def_cfa_offset 8
197 ; AVX-LABEL: constrained_vector_frem_v2f64:
198 ; AVX: # %bb.0: # %entry
199 ; AVX-NEXT: subq $24, %rsp
200 ; AVX-NEXT: .cfi_def_cfa_offset 32
201 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
202 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
203 ; AVX-NEXT: callq fmod@PLT
204 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
205 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
206 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
207 ; AVX-NEXT: callq fmod@PLT
208 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
209 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
210 ; AVX-NEXT: addq $24, %rsp
211 ; AVX-NEXT: .cfi_def_cfa_offset 8
214 %rem = call <2 x double> @llvm.experimental.constrained.frem.v2f64(
215 <2 x double> <double 1.000000e+00, double 2.000000e+00>,
216 <2 x double> <double 1.000000e+01, double 1.000000e+01>,
217 metadata !"round.dynamic",
218 metadata !"fpexcept.strict") #0
219 ret <2 x double> %rem
222 define <3 x float> @constrained_vector_frem_v3f32() #0 {
223 ; CHECK-LABEL: constrained_vector_frem_v3f32:
224 ; CHECK: # %bb.0: # %entry
225 ; CHECK-NEXT: subq $40, %rsp
226 ; CHECK-NEXT: .cfi_def_cfa_offset 48
227 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
228 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
229 ; CHECK-NEXT: callq fmodf@PLT
230 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
231 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
232 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
233 ; CHECK-NEXT: callq fmodf@PLT
234 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
235 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
236 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
237 ; CHECK-NEXT: callq fmodf@PLT
238 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
239 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
240 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
241 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
242 ; CHECK-NEXT: movaps %xmm1, %xmm0
243 ; CHECK-NEXT: addq $40, %rsp
244 ; CHECK-NEXT: .cfi_def_cfa_offset 8
247 ; AVX-LABEL: constrained_vector_frem_v3f32:
248 ; AVX: # %bb.0: # %entry
249 ; AVX-NEXT: subq $40, %rsp
250 ; AVX-NEXT: .cfi_def_cfa_offset 48
251 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
252 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
253 ; AVX-NEXT: callq fmodf@PLT
254 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
255 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
256 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
257 ; AVX-NEXT: callq fmodf@PLT
258 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
259 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
260 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
261 ; AVX-NEXT: callq fmodf@PLT
262 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
263 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
264 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
265 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
266 ; AVX-NEXT: addq $40, %rsp
267 ; AVX-NEXT: .cfi_def_cfa_offset 8
270 %rem = call <3 x float> @llvm.experimental.constrained.frem.v3f32(
271 <3 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>,
272 <3 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>,
273 metadata !"round.dynamic",
274 metadata !"fpexcept.strict") #0
278 define <3 x double> @constrained_vector_frem_v3f64() #0 {
279 ; CHECK-LABEL: constrained_vector_frem_v3f64:
280 ; CHECK: # %bb.0: # %entry
281 ; CHECK-NEXT: subq $24, %rsp
282 ; CHECK-NEXT: .cfi_def_cfa_offset 32
283 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
284 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
285 ; CHECK-NEXT: callq fmod@PLT
286 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
287 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
288 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
289 ; CHECK-NEXT: callq fmod@PLT
290 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
291 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
292 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
293 ; CHECK-NEXT: callq fmod@PLT
294 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
295 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
297 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
298 ; CHECK-NEXT: # xmm0 = mem[0],zero
299 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
300 ; CHECK-NEXT: # xmm1 = mem[0],zero
301 ; CHECK-NEXT: addq $24, %rsp
302 ; CHECK-NEXT: .cfi_def_cfa_offset 8
305 ; AVX-LABEL: constrained_vector_frem_v3f64:
306 ; AVX: # %bb.0: # %entry
307 ; AVX-NEXT: subq $40, %rsp
308 ; AVX-NEXT: .cfi_def_cfa_offset 48
309 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
310 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
311 ; AVX-NEXT: callq fmod@PLT
312 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
313 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
314 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
315 ; AVX-NEXT: callq fmod@PLT
316 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
317 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
318 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
319 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
320 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
321 ; AVX-NEXT: vzeroupper
322 ; AVX-NEXT: callq fmod@PLT
323 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
324 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
325 ; AVX-NEXT: addq $40, %rsp
326 ; AVX-NEXT: .cfi_def_cfa_offset 8
329 %rem = call <3 x double> @llvm.experimental.constrained.frem.v3f64(
330 <3 x double> <double 1.000000e+00, double 2.000000e+00, double 3.000000e+00>,
331 <3 x double> <double 1.000000e+01, double 1.000000e+01, double 1.000000e+01>,
332 metadata !"round.dynamic",
333 metadata !"fpexcept.strict") #0
334 ret <3 x double> %rem
337 define <4 x double> @constrained_vector_frem_v4f64() #0 {
338 ; CHECK-LABEL: constrained_vector_frem_v4f64:
340 ; CHECK-NEXT: subq $40, %rsp
341 ; CHECK-NEXT: .cfi_def_cfa_offset 48
342 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
343 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
344 ; CHECK-NEXT: callq fmod@PLT
345 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
346 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
347 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
348 ; CHECK-NEXT: callq fmod@PLT
349 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
350 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
351 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
352 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
353 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
354 ; CHECK-NEXT: callq fmod@PLT
355 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
356 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
357 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
358 ; CHECK-NEXT: callq fmod@PLT
359 ; CHECK-NEXT: movaps %xmm0, %xmm1
360 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
361 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
362 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
363 ; CHECK-NEXT: addq $40, %rsp
364 ; CHECK-NEXT: .cfi_def_cfa_offset 8
367 ; AVX-LABEL: constrained_vector_frem_v4f64:
369 ; AVX-NEXT: subq $40, %rsp
370 ; AVX-NEXT: .cfi_def_cfa_offset 48
371 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
372 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
373 ; AVX-NEXT: callq fmod@PLT
374 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
375 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
376 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
377 ; AVX-NEXT: callq fmod@PLT
378 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
379 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
380 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
381 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
382 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
383 ; AVX-NEXT: callq fmod@PLT
384 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
385 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
386 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
387 ; AVX-NEXT: callq fmod@PLT
388 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
389 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
390 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
391 ; AVX-NEXT: addq $40, %rsp
392 ; AVX-NEXT: .cfi_def_cfa_offset 8
394 %rem = call <4 x double> @llvm.experimental.constrained.frem.v4f64(
395 <4 x double> <double 1.000000e+00, double 2.000000e+00,
396 double 3.000000e+00, double 4.000000e+00>,
397 <4 x double> <double 1.000000e+01, double 1.000000e+01,
398 double 1.000000e+01, double 1.000000e+01>,
399 metadata !"round.dynamic",
400 metadata !"fpexcept.strict") #0
401 ret <4 x double> %rem
404 define <1 x float> @constrained_vector_fmul_v1f32() #0 {
405 ; CHECK-LABEL: constrained_vector_fmul_v1f32:
406 ; CHECK: # %bb.0: # %entry
407 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
408 ; CHECK-NEXT: mulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
411 ; AVX-LABEL: constrained_vector_fmul_v1f32:
412 ; AVX: # %bb.0: # %entry
413 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
414 ; AVX-NEXT: vmulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
417 %mul = call <1 x float> @llvm.experimental.constrained.fmul.v1f32(
418 <1 x float> <float 0x7FF0000000000000>,
419 <1 x float> <float 2.000000e+00>,
420 metadata !"round.dynamic",
421 metadata !"fpexcept.strict") #0
425 define <2 x double> @constrained_vector_fmul_v2f64() #0 {
426 ; CHECK-LABEL: constrained_vector_fmul_v2f64:
427 ; CHECK: # %bb.0: # %entry
428 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
429 ; CHECK-NEXT: mulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
432 ; AVX-LABEL: constrained_vector_fmul_v2f64:
433 ; AVX: # %bb.0: # %entry
434 ; AVX-NEXT: vmovddup {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
435 ; AVX-NEXT: # xmm0 = mem[0,0]
436 ; AVX-NEXT: vmulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
439 %mul = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(
440 <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
441 <2 x double> <double 2.000000e+00, double 3.000000e+00>,
442 metadata !"round.dynamic",
443 metadata !"fpexcept.strict") #0
444 ret <2 x double> %mul
447 define <3 x float> @constrained_vector_fmul_v3f32() #0 {
448 ; CHECK-LABEL: constrained_vector_fmul_v3f32:
449 ; CHECK: # %bb.0: # %entry
450 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
451 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
452 ; CHECK-NEXT: mulss %xmm1, %xmm2
453 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
454 ; CHECK-NEXT: mulss %xmm1, %xmm0
455 ; CHECK-NEXT: mulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
456 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
457 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
460 ; AVX-LABEL: constrained_vector_fmul_v3f32:
461 ; AVX: # %bb.0: # %entry
462 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
463 ; AVX-NEXT: vmulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
464 ; AVX-NEXT: vmulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm2
465 ; AVX-NEXT: vmulss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
466 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm2[0],xmm0[0],xmm2[2,3]
467 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm1[0],xmm0[3]
470 %mul = call <3 x float> @llvm.experimental.constrained.fmul.v3f32(
471 <3 x float> <float 0x7FF0000000000000, float 0x7FF0000000000000,
472 float 0x7FF0000000000000>,
473 <3 x float> <float 1.000000e+00, float 1.000000e+01, float 1.000000e+02>,
474 metadata !"round.dynamic",
475 metadata !"fpexcept.strict") #0
479 define <3 x double> @constrained_vector_fmul_v3f64() #0 {
480 ; CHECK-LABEL: constrained_vector_fmul_v3f64:
481 ; CHECK: # %bb.0: # %entry
482 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
483 ; CHECK-NEXT: mulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
484 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
485 ; CHECK-NEXT: mulsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
486 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
487 ; CHECK-NEXT: movapd %xmm0, %xmm1
488 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
489 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
493 ; AVX-LABEL: constrained_vector_fmul_v3f64:
494 ; AVX: # %bb.0: # %entry
495 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
496 ; AVX-NEXT: vmulsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
497 ; AVX-NEXT: vmovddup {{.*#+}} xmm1 = [1.7976931348623157E+308,1.7976931348623157E+308]
498 ; AVX-NEXT: # xmm1 = mem[0,0]
499 ; AVX-NEXT: vmulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
500 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
503 %mul = call <3 x double> @llvm.experimental.constrained.fmul.v3f64(
504 <3 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
505 double 0x7FEFFFFFFFFFFFFF>,
506 <3 x double> <double 1.000000e+00, double 1.000000e+01, double 1.000000e+02>,
507 metadata !"round.dynamic",
508 metadata !"fpexcept.strict") #0
509 ret <3 x double> %mul
512 define <4 x double> @constrained_vector_fmul_v4f64() #0 {
513 ; CHECK-LABEL: constrained_vector_fmul_v4f64:
514 ; CHECK: # %bb.0: # %entry
515 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
516 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [4.0E+0,5.0E+0]
517 ; CHECK-NEXT: mulpd %xmm0, %xmm1
518 ; CHECK-NEXT: mulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
521 ; AVX-LABEL: constrained_vector_fmul_v4f64:
522 ; AVX: # %bb.0: # %entry
523 ; AVX-NEXT: vbroadcastsd {{.*#+}} ymm0 = [1.7976931348623157E+308,1.7976931348623157E+308,1.7976931348623157E+308,1.7976931348623157E+308]
524 ; AVX-NEXT: vmulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
527 %mul = call <4 x double> @llvm.experimental.constrained.fmul.v4f64(
528 <4 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
529 double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
530 <4 x double> <double 2.000000e+00, double 3.000000e+00,
531 double 4.000000e+00, double 5.000000e+00>,
532 metadata !"round.dynamic",
533 metadata !"fpexcept.strict") #0
534 ret <4 x double> %mul
537 define <1 x float> @constrained_vector_fadd_v1f32() #0 {
538 ; CHECK-LABEL: constrained_vector_fadd_v1f32:
539 ; CHECK: # %bb.0: # %entry
540 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
541 ; CHECK-NEXT: addss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
544 ; AVX-LABEL: constrained_vector_fadd_v1f32:
545 ; AVX: # %bb.0: # %entry
546 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
547 ; AVX-NEXT: vaddss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
550 %add = call <1 x float> @llvm.experimental.constrained.fadd.v1f32(
551 <1 x float> <float 0x7FF0000000000000>,
552 <1 x float> <float 1.0>,
553 metadata !"round.dynamic",
554 metadata !"fpexcept.strict") #0
558 define <2 x double> @constrained_vector_fadd_v2f64() #0 {
559 ; CHECK-LABEL: constrained_vector_fadd_v2f64:
560 ; CHECK: # %bb.0: # %entry
561 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
562 ; CHECK-NEXT: addpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
565 ; AVX-LABEL: constrained_vector_fadd_v2f64:
566 ; AVX: # %bb.0: # %entry
567 ; AVX-NEXT: vmovddup {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
568 ; AVX-NEXT: # xmm0 = mem[0,0]
569 ; AVX-NEXT: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
572 %add = call <2 x double> @llvm.experimental.constrained.fadd.v2f64(
573 <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
574 <2 x double> <double 1.000000e+00, double 1.000000e-01>,
575 metadata !"round.dynamic",
576 metadata !"fpexcept.strict") #0
577 ret <2 x double> %add
580 define <3 x float> @constrained_vector_fadd_v3f32() #0 {
581 ; CHECK-LABEL: constrained_vector_fadd_v3f32:
582 ; CHECK: # %bb.0: # %entry
583 ; CHECK-NEXT: xorps %xmm1, %xmm1
584 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
585 ; CHECK-NEXT: addss %xmm2, %xmm1
586 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
587 ; CHECK-NEXT: addss %xmm2, %xmm0
588 ; CHECK-NEXT: addss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm2
589 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
590 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
593 ; AVX-LABEL: constrained_vector_fadd_v3f32:
594 ; AVX: # %bb.0: # %entry
595 ; AVX-NEXT: vxorps %xmm0, %xmm0, %xmm0
596 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
597 ; AVX-NEXT: vaddss %xmm0, %xmm1, %xmm0
598 ; AVX-NEXT: vaddss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm2
599 ; AVX-NEXT: vaddss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
600 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
601 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
604 %add = call <3 x float> @llvm.experimental.constrained.fadd.v3f32(
605 <3 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000,
606 float 0xFFFFFFFFE0000000>,
607 <3 x float> <float 2.0, float 1.0, float 0.0>,
608 metadata !"round.dynamic",
609 metadata !"fpexcept.strict") #0
613 define <3 x double> @constrained_vector_fadd_v3f64() #0 {
614 ; CHECK-LABEL: constrained_vector_fadd_v3f64:
615 ; CHECK: # %bb.0: # %entry
616 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
617 ; CHECK-NEXT: addpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
618 ; CHECK-NEXT: xorpd %xmm1, %xmm1
619 ; CHECK-NEXT: addsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
620 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
621 ; CHECK-NEXT: movapd %xmm0, %xmm1
622 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
623 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
627 ; AVX-LABEL: constrained_vector_fadd_v3f64:
628 ; AVX: # %bb.0: # %entry
629 ; AVX-NEXT: vxorpd %xmm0, %xmm0, %xmm0
630 ; AVX-NEXT: vaddsd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
631 ; AVX-NEXT: vmovddup {{.*#+}} xmm1 = [1.7976931348623157E+308,1.7976931348623157E+308]
632 ; AVX-NEXT: # xmm1 = mem[0,0]
633 ; AVX-NEXT: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
634 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
637 %add = call <3 x double> @llvm.experimental.constrained.fadd.v3f64(
638 <3 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
639 double 0x7FEFFFFFFFFFFFFF>,
640 <3 x double> <double 2.0, double 1.0, double 0.0>,
641 metadata !"round.dynamic",
642 metadata !"fpexcept.strict") #0
643 ret <3 x double> %add
646 define <4 x double> @constrained_vector_fadd_v4f64() #0 {
647 ; CHECK-LABEL: constrained_vector_fadd_v4f64:
648 ; CHECK: # %bb.0: # %entry
649 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
650 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [2.0E+0,2.0000000000000001E-1]
651 ; CHECK-NEXT: addpd %xmm0, %xmm1
652 ; CHECK-NEXT: addpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
655 ; AVX-LABEL: constrained_vector_fadd_v4f64:
656 ; AVX: # %bb.0: # %entry
657 ; AVX-NEXT: vbroadcastsd {{.*#+}} ymm0 = [1.7976931348623157E+308,1.7976931348623157E+308,1.7976931348623157E+308,1.7976931348623157E+308]
658 ; AVX-NEXT: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
661 %add = call <4 x double> @llvm.experimental.constrained.fadd.v4f64(
662 <4 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
663 double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
664 <4 x double> <double 1.000000e+00, double 1.000000e-01,
665 double 2.000000e+00, double 2.000000e-01>,
666 metadata !"round.dynamic",
667 metadata !"fpexcept.strict") #0
668 ret <4 x double> %add
671 define <1 x float> @constrained_vector_fsub_v1f32() #0 {
672 ; CHECK-LABEL: constrained_vector_fsub_v1f32:
673 ; CHECK: # %bb.0: # %entry
674 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
675 ; CHECK-NEXT: subss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
678 ; AVX-LABEL: constrained_vector_fsub_v1f32:
679 ; AVX: # %bb.0: # %entry
680 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
681 ; AVX-NEXT: vsubss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
684 %sub = call <1 x float> @llvm.experimental.constrained.fsub.v1f32(
685 <1 x float> <float 0x7FF0000000000000>,
686 <1 x float> <float 1.000000e+00>,
687 metadata !"round.dynamic",
688 metadata !"fpexcept.strict") #0
692 define <2 x double> @constrained_vector_fsub_v2f64() #0 {
693 ; CHECK-LABEL: constrained_vector_fsub_v2f64:
694 ; CHECK: # %bb.0: # %entry
695 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
696 ; CHECK-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
699 ; AVX-LABEL: constrained_vector_fsub_v2f64:
700 ; AVX: # %bb.0: # %entry
701 ; AVX-NEXT: vmovddup {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
702 ; AVX-NEXT: # xmm0 = mem[0,0]
703 ; AVX-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
706 %sub = call <2 x double> @llvm.experimental.constrained.fsub.v2f64(
707 <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>,
708 <2 x double> <double 1.000000e+00, double 1.000000e-01>,
709 metadata !"round.dynamic",
710 metadata !"fpexcept.strict") #0
711 ret <2 x double> %sub
714 define <3 x float> @constrained_vector_fsub_v3f32() #0 {
715 ; CHECK-LABEL: constrained_vector_fsub_v3f32:
716 ; CHECK: # %bb.0: # %entry
717 ; CHECK-NEXT: xorps %xmm0, %xmm0
718 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
719 ; CHECK-NEXT: movaps %xmm1, %xmm2
720 ; CHECK-NEXT: subss %xmm0, %xmm2
721 ; CHECK-NEXT: movaps %xmm1, %xmm0
722 ; CHECK-NEXT: subss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
723 ; CHECK-NEXT: subss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
724 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
725 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
728 ; AVX-LABEL: constrained_vector_fsub_v3f32:
729 ; AVX: # %bb.0: # %entry
730 ; AVX-NEXT: vxorps %xmm0, %xmm0, %xmm0
731 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
732 ; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
733 ; AVX-NEXT: vsubss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm2
734 ; AVX-NEXT: vsubss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
735 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
736 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
739 %sub = call <3 x float> @llvm.experimental.constrained.fsub.v3f32(
740 <3 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000,
741 float 0xFFFFFFFFE0000000>,
742 <3 x float> <float 2.0, float 1.0, float 0.0>,
743 metadata !"round.dynamic",
744 metadata !"fpexcept.strict") #0
748 define <3 x double> @constrained_vector_fsub_v3f64() #0 {
749 ; CHECK-LABEL: constrained_vector_fsub_v3f64:
750 ; CHECK: # %bb.0: # %entry
751 ; CHECK-NEXT: xorpd %xmm0, %xmm0
752 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
753 ; CHECK-NEXT: subsd %xmm0, %xmm1
754 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
755 ; CHECK-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
756 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
757 ; CHECK-NEXT: movapd %xmm0, %xmm1
758 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
759 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
763 ; AVX-LABEL: constrained_vector_fsub_v3f64:
764 ; AVX: # %bb.0: # %entry
765 ; AVX-NEXT: vxorpd %xmm0, %xmm0, %xmm0
766 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
767 ; AVX-NEXT: vsubsd %xmm0, %xmm1, %xmm0
768 ; AVX-NEXT: vmovddup {{.*#+}} xmm1 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
769 ; AVX-NEXT: # xmm1 = mem[0,0]
770 ; AVX-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
771 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
774 %sub = call <3 x double> @llvm.experimental.constrained.fsub.v3f64(
775 <3 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF,
776 double 0xFFEFFFFFFFFFFFFF>,
777 <3 x double> <double 2.0, double 1.0, double 0.0>,
778 metadata !"round.dynamic",
779 metadata !"fpexcept.strict") #0
780 ret <3 x double> %sub
783 define <4 x double> @constrained_vector_fsub_v4f64() #0 {
784 ; CHECK-LABEL: constrained_vector_fsub_v4f64:
785 ; CHECK: # %bb.0: # %entry
786 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
787 ; CHECK-NEXT: movapd %xmm0, %xmm1
788 ; CHECK-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
789 ; CHECK-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
792 ; AVX-LABEL: constrained_vector_fsub_v4f64:
793 ; AVX: # %bb.0: # %entry
794 ; AVX-NEXT: vbroadcastsd {{.*#+}} ymm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308,-1.7976931348623157E+308,-1.7976931348623157E+308]
795 ; AVX-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
798 %sub = call <4 x double> @llvm.experimental.constrained.fsub.v4f64(
799 <4 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF,
800 double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>,
801 <4 x double> <double 1.000000e+00, double 1.000000e-01,
802 double 2.000000e+00, double 2.000000e-01>,
803 metadata !"round.dynamic",
804 metadata !"fpexcept.strict") #0
805 ret <4 x double> %sub
808 define <1 x float> @constrained_vector_sqrt_v1f32() #0 {
809 ; CHECK-LABEL: constrained_vector_sqrt_v1f32:
810 ; CHECK: # %bb.0: # %entry
811 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
812 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
815 ; AVX-LABEL: constrained_vector_sqrt_v1f32:
816 ; AVX: # %bb.0: # %entry
817 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
818 ; AVX-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
821 %sqrt = call <1 x float> @llvm.experimental.constrained.sqrt.v1f32(
822 <1 x float> <float 42.0>,
823 metadata !"round.dynamic",
824 metadata !"fpexcept.strict") #0
825 ret <1 x float> %sqrt
828 define <2 x double> @constrained_vector_sqrt_v2f64() #0 {
829 ; CHECK-LABEL: constrained_vector_sqrt_v2f64:
830 ; CHECK: # %bb.0: # %entry
831 ; CHECK-NEXT: sqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
834 ; AVX-LABEL: constrained_vector_sqrt_v2f64:
835 ; AVX: # %bb.0: # %entry
836 ; AVX-NEXT: vsqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
839 %sqrt = call <2 x double> @llvm.experimental.constrained.sqrt.v2f64(
840 <2 x double> <double 42.0, double 42.1>,
841 metadata !"round.dynamic",
842 metadata !"fpexcept.strict") #0
843 ret <2 x double> %sqrt
846 define <3 x float> @constrained_vector_sqrt_v3f32() #0 {
847 ; CHECK-LABEL: constrained_vector_sqrt_v3f32:
848 ; CHECK: # %bb.0: # %entry
849 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
850 ; CHECK-NEXT: sqrtss %xmm0, %xmm1
851 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
852 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
853 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
854 ; CHECK-NEXT: sqrtss %xmm2, %xmm2
855 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
856 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
859 ; AVX-LABEL: constrained_vector_sqrt_v3f32:
860 ; AVX: # %bb.0: # %entry
861 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
862 ; AVX-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
863 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
864 ; AVX-NEXT: vsqrtss %xmm1, %xmm1, %xmm1
865 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
866 ; AVX-NEXT: vsqrtss %xmm2, %xmm2, %xmm2
867 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
868 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
871 %sqrt = call <3 x float> @llvm.experimental.constrained.sqrt.v3f32(
872 <3 x float> <float 42.0, float 43.0, float 44.0>,
873 metadata !"round.dynamic",
874 metadata !"fpexcept.strict") #0
875 ret <3 x float> %sqrt
878 define <3 x double> @constrained_vector_sqrt_v3f64() #0 {
879 ; CHECK-LABEL: constrained_vector_sqrt_v3f64:
880 ; CHECK: # %bb.0: # %entry
881 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
882 ; CHECK-NEXT: sqrtsd %xmm0, %xmm1
883 ; CHECK-NEXT: sqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
884 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
885 ; CHECK-NEXT: movapd %xmm0, %xmm1
886 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
887 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
891 ; AVX-LABEL: constrained_vector_sqrt_v3f64:
892 ; AVX: # %bb.0: # %entry
893 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
894 ; AVX-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0
895 ; AVX-NEXT: vsqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
896 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
899 %sqrt = call <3 x double> @llvm.experimental.constrained.sqrt.v3f64(
900 <3 x double> <double 42.0, double 42.1, double 42.2>,
901 metadata !"round.dynamic",
902 metadata !"fpexcept.strict") #0
903 ret <3 x double> %sqrt
906 define <4 x double> @constrained_vector_sqrt_v4f64() #0 {
907 ; CHECK-LABEL: constrained_vector_sqrt_v4f64:
908 ; CHECK: # %bb.0: # %entry
909 ; CHECK-NEXT: sqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
910 ; CHECK-NEXT: sqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
913 ; AVX-LABEL: constrained_vector_sqrt_v4f64:
914 ; AVX: # %bb.0: # %entry
915 ; AVX-NEXT: vsqrtpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0
918 %sqrt = call <4 x double> @llvm.experimental.constrained.sqrt.v4f64(
919 <4 x double> <double 42.0, double 42.1,
920 double 42.2, double 42.3>,
921 metadata !"round.dynamic",
922 metadata !"fpexcept.strict") #0
923 ret <4 x double> %sqrt
926 define <1 x float> @constrained_vector_pow_v1f32() #0 {
927 ; CHECK-LABEL: constrained_vector_pow_v1f32:
928 ; CHECK: # %bb.0: # %entry
929 ; CHECK-NEXT: pushq %rax
930 ; CHECK-NEXT: .cfi_def_cfa_offset 16
931 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
932 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
933 ; CHECK-NEXT: callq powf@PLT
934 ; CHECK-NEXT: popq %rax
935 ; CHECK-NEXT: .cfi_def_cfa_offset 8
938 ; AVX-LABEL: constrained_vector_pow_v1f32:
939 ; AVX: # %bb.0: # %entry
940 ; AVX-NEXT: pushq %rax
941 ; AVX-NEXT: .cfi_def_cfa_offset 16
942 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
943 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
944 ; AVX-NEXT: callq powf@PLT
945 ; AVX-NEXT: popq %rax
946 ; AVX-NEXT: .cfi_def_cfa_offset 8
949 %pow = call <1 x float> @llvm.experimental.constrained.pow.v1f32(
950 <1 x float> <float 42.0>,
951 <1 x float> <float 3.0>,
952 metadata !"round.dynamic",
953 metadata !"fpexcept.strict") #0
957 define <2 x double> @constrained_vector_pow_v2f64() #0 {
958 ; CHECK-LABEL: constrained_vector_pow_v2f64:
959 ; CHECK: # %bb.0: # %entry
960 ; CHECK-NEXT: subq $24, %rsp
961 ; CHECK-NEXT: .cfi_def_cfa_offset 32
962 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
963 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
964 ; CHECK-NEXT: callq pow@PLT
965 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
966 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
967 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
968 ; CHECK-NEXT: callq pow@PLT
969 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
970 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
971 ; CHECK-NEXT: addq $24, %rsp
972 ; CHECK-NEXT: .cfi_def_cfa_offset 8
975 ; AVX-LABEL: constrained_vector_pow_v2f64:
976 ; AVX: # %bb.0: # %entry
977 ; AVX-NEXT: subq $24, %rsp
978 ; AVX-NEXT: .cfi_def_cfa_offset 32
979 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
980 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
981 ; AVX-NEXT: callq pow@PLT
982 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
983 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
984 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
985 ; AVX-NEXT: callq pow@PLT
986 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
987 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
988 ; AVX-NEXT: addq $24, %rsp
989 ; AVX-NEXT: .cfi_def_cfa_offset 8
992 %pow = call <2 x double> @llvm.experimental.constrained.pow.v2f64(
993 <2 x double> <double 42.1, double 42.2>,
994 <2 x double> <double 3.0, double 3.0>,
995 metadata !"round.dynamic",
996 metadata !"fpexcept.strict") #0
997 ret <2 x double> %pow
1000 define <3 x float> @constrained_vector_pow_v3f32() #0 {
1001 ; CHECK-LABEL: constrained_vector_pow_v3f32:
1002 ; CHECK: # %bb.0: # %entry
1003 ; CHECK-NEXT: subq $40, %rsp
1004 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1005 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1006 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1007 ; CHECK-NEXT: callq powf@PLT
1008 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1009 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1010 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1011 ; CHECK-NEXT: callq powf@PLT
1012 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1013 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1014 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1015 ; CHECK-NEXT: callq powf@PLT
1016 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1017 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1018 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1019 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1020 ; CHECK-NEXT: movaps %xmm1, %xmm0
1021 ; CHECK-NEXT: addq $40, %rsp
1022 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1025 ; AVX-LABEL: constrained_vector_pow_v3f32:
1026 ; AVX: # %bb.0: # %entry
1027 ; AVX-NEXT: subq $40, %rsp
1028 ; AVX-NEXT: .cfi_def_cfa_offset 48
1029 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1030 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1031 ; AVX-NEXT: callq powf@PLT
1032 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1033 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1034 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1035 ; AVX-NEXT: callq powf@PLT
1036 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1037 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1038 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1039 ; AVX-NEXT: callq powf@PLT
1040 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
1041 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
1042 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1043 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
1044 ; AVX-NEXT: addq $40, %rsp
1045 ; AVX-NEXT: .cfi_def_cfa_offset 8
1048 %pow = call <3 x float> @llvm.experimental.constrained.pow.v3f32(
1049 <3 x float> <float 42.0, float 43.0, float 44.0>,
1050 <3 x float> <float 3.0, float 3.0, float 3.0>,
1051 metadata !"round.dynamic",
1052 metadata !"fpexcept.strict") #0
1053 ret <3 x float> %pow
1056 define <3 x double> @constrained_vector_pow_v3f64() #0 {
1057 ; CHECK-LABEL: constrained_vector_pow_v3f64:
1058 ; CHECK: # %bb.0: # %entry
1059 ; CHECK-NEXT: subq $24, %rsp
1060 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1061 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1062 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1063 ; CHECK-NEXT: callq pow@PLT
1064 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1065 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1066 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1067 ; CHECK-NEXT: callq pow@PLT
1068 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1069 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1070 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1071 ; CHECK-NEXT: callq pow@PLT
1072 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1073 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1075 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
1076 ; CHECK-NEXT: # xmm0 = mem[0],zero
1077 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
1078 ; CHECK-NEXT: # xmm1 = mem[0],zero
1079 ; CHECK-NEXT: addq $24, %rsp
1080 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1083 ; AVX-LABEL: constrained_vector_pow_v3f64:
1084 ; AVX: # %bb.0: # %entry
1085 ; AVX-NEXT: subq $40, %rsp
1086 ; AVX-NEXT: .cfi_def_cfa_offset 48
1087 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1088 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1089 ; AVX-NEXT: callq pow@PLT
1090 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1091 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1092 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1093 ; AVX-NEXT: callq pow@PLT
1094 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1095 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1096 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
1097 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1098 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1099 ; AVX-NEXT: vzeroupper
1100 ; AVX-NEXT: callq pow@PLT
1101 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
1102 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1103 ; AVX-NEXT: addq $40, %rsp
1104 ; AVX-NEXT: .cfi_def_cfa_offset 8
1107 %pow = call <3 x double> @llvm.experimental.constrained.pow.v3f64(
1108 <3 x double> <double 42.0, double 42.1, double 42.2>,
1109 <3 x double> <double 3.0, double 3.0, double 3.0>,
1110 metadata !"round.dynamic",
1111 metadata !"fpexcept.strict") #0
1112 ret <3 x double> %pow
1115 define <4 x double> @constrained_vector_pow_v4f64() #0 {
1116 ; CHECK-LABEL: constrained_vector_pow_v4f64:
1117 ; CHECK: # %bb.0: # %entry
1118 ; CHECK-NEXT: subq $40, %rsp
1119 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1120 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1121 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1122 ; CHECK-NEXT: callq pow@PLT
1123 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1124 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1125 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1126 ; CHECK-NEXT: callq pow@PLT
1127 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1128 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1129 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1130 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1131 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1132 ; CHECK-NEXT: callq pow@PLT
1133 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1134 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1135 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
1136 ; CHECK-NEXT: callq pow@PLT
1137 ; CHECK-NEXT: movaps %xmm0, %xmm1
1138 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1139 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1140 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1141 ; CHECK-NEXT: addq $40, %rsp
1142 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1145 ; AVX-LABEL: constrained_vector_pow_v4f64:
1146 ; AVX: # %bb.0: # %entry
1147 ; AVX-NEXT: subq $40, %rsp
1148 ; AVX-NEXT: .cfi_def_cfa_offset 48
1149 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1150 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1151 ; AVX-NEXT: callq pow@PLT
1152 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1153 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1154 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1155 ; AVX-NEXT: callq pow@PLT
1156 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1157 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1158 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1159 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1160 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1161 ; AVX-NEXT: callq pow@PLT
1162 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1163 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1164 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
1165 ; AVX-NEXT: callq pow@PLT
1166 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1167 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1168 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
1169 ; AVX-NEXT: addq $40, %rsp
1170 ; AVX-NEXT: .cfi_def_cfa_offset 8
1173 %pow = call <4 x double> @llvm.experimental.constrained.pow.v4f64(
1174 <4 x double> <double 42.1, double 42.2,
1175 double 42.3, double 42.4>,
1176 <4 x double> <double 3.0, double 3.0,
1177 double 3.0, double 3.0>,
1178 metadata !"round.dynamic",
1179 metadata !"fpexcept.strict") #0
1180 ret <4 x double> %pow
1183 define <1 x float> @constrained_vector_powi_v1f32() #0 {
1184 ; CHECK-LABEL: constrained_vector_powi_v1f32:
1185 ; CHECK: # %bb.0: # %entry
1186 ; CHECK-NEXT: pushq %rax
1187 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1188 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1189 ; CHECK-NEXT: movl $3, %edi
1190 ; CHECK-NEXT: callq __powisf2@PLT
1191 ; CHECK-NEXT: popq %rax
1192 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1195 ; AVX-LABEL: constrained_vector_powi_v1f32:
1196 ; AVX: # %bb.0: # %entry
1197 ; AVX-NEXT: pushq %rax
1198 ; AVX-NEXT: .cfi_def_cfa_offset 16
1199 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1200 ; AVX-NEXT: movl $3, %edi
1201 ; AVX-NEXT: callq __powisf2@PLT
1202 ; AVX-NEXT: popq %rax
1203 ; AVX-NEXT: .cfi_def_cfa_offset 8
1206 %powi = call <1 x float> @llvm.experimental.constrained.powi.v1f32(
1207 <1 x float> <float 42.0>,
1209 metadata !"round.dynamic",
1210 metadata !"fpexcept.strict") #0
1211 ret <1 x float> %powi
1214 define <2 x double> @constrained_vector_powi_v2f64() #0 {
1215 ; CHECK-LABEL: constrained_vector_powi_v2f64:
1216 ; CHECK: # %bb.0: # %entry
1217 ; CHECK-NEXT: subq $24, %rsp
1218 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1219 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1220 ; CHECK-NEXT: movl $3, %edi
1221 ; CHECK-NEXT: callq __powidf2@PLT
1222 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1223 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1224 ; CHECK-NEXT: movl $3, %edi
1225 ; CHECK-NEXT: callq __powidf2@PLT
1226 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1227 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1228 ; CHECK-NEXT: addq $24, %rsp
1229 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1232 ; AVX-LABEL: constrained_vector_powi_v2f64:
1233 ; AVX: # %bb.0: # %entry
1234 ; AVX-NEXT: subq $24, %rsp
1235 ; AVX-NEXT: .cfi_def_cfa_offset 32
1236 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1237 ; AVX-NEXT: movl $3, %edi
1238 ; AVX-NEXT: callq __powidf2@PLT
1239 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1240 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1241 ; AVX-NEXT: movl $3, %edi
1242 ; AVX-NEXT: callq __powidf2@PLT
1243 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1244 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1245 ; AVX-NEXT: addq $24, %rsp
1246 ; AVX-NEXT: .cfi_def_cfa_offset 8
1249 %powi = call <2 x double> @llvm.experimental.constrained.powi.v2f64(
1250 <2 x double> <double 42.1, double 42.2>,
1252 metadata !"round.dynamic",
1253 metadata !"fpexcept.strict") #0
1254 ret <2 x double> %powi
1257 define <3 x float> @constrained_vector_powi_v3f32() #0 {
1258 ; CHECK-LABEL: constrained_vector_powi_v3f32:
1259 ; CHECK: # %bb.0: # %entry
1260 ; CHECK-NEXT: subq $40, %rsp
1261 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1262 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1263 ; CHECK-NEXT: movl $3, %edi
1264 ; CHECK-NEXT: callq __powisf2@PLT
1265 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1266 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1267 ; CHECK-NEXT: movl $3, %edi
1268 ; CHECK-NEXT: callq __powisf2@PLT
1269 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1270 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1271 ; CHECK-NEXT: movl $3, %edi
1272 ; CHECK-NEXT: callq __powisf2@PLT
1273 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1274 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1275 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1276 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1277 ; CHECK-NEXT: movaps %xmm1, %xmm0
1278 ; CHECK-NEXT: addq $40, %rsp
1279 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1282 ; AVX-LABEL: constrained_vector_powi_v3f32:
1283 ; AVX: # %bb.0: # %entry
1284 ; AVX-NEXT: subq $40, %rsp
1285 ; AVX-NEXT: .cfi_def_cfa_offset 48
1286 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1287 ; AVX-NEXT: movl $3, %edi
1288 ; AVX-NEXT: callq __powisf2@PLT
1289 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1290 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1291 ; AVX-NEXT: movl $3, %edi
1292 ; AVX-NEXT: callq __powisf2@PLT
1293 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1294 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1295 ; AVX-NEXT: movl $3, %edi
1296 ; AVX-NEXT: callq __powisf2@PLT
1297 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
1298 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
1299 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1300 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
1301 ; AVX-NEXT: addq $40, %rsp
1302 ; AVX-NEXT: .cfi_def_cfa_offset 8
1305 %powi = call <3 x float> @llvm.experimental.constrained.powi.v3f32(
1306 <3 x float> <float 42.0, float 43.0, float 44.0>,
1308 metadata !"round.dynamic",
1309 metadata !"fpexcept.strict") #0
1310 ret <3 x float> %powi
1313 define <3 x double> @constrained_vector_powi_v3f64() #0 {
1314 ; CHECK-LABEL: constrained_vector_powi_v3f64:
1315 ; CHECK: # %bb.0: # %entry
1316 ; CHECK-NEXT: subq $24, %rsp
1317 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1318 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1319 ; CHECK-NEXT: movl $3, %edi
1320 ; CHECK-NEXT: callq __powidf2@PLT
1321 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1322 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1323 ; CHECK-NEXT: movl $3, %edi
1324 ; CHECK-NEXT: callq __powidf2@PLT
1325 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1326 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1327 ; CHECK-NEXT: movl $3, %edi
1328 ; CHECK-NEXT: callq __powidf2@PLT
1329 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1330 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1332 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
1333 ; CHECK-NEXT: # xmm0 = mem[0],zero
1334 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
1335 ; CHECK-NEXT: # xmm1 = mem[0],zero
1336 ; CHECK-NEXT: addq $24, %rsp
1337 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1340 ; AVX-LABEL: constrained_vector_powi_v3f64:
1341 ; AVX: # %bb.0: # %entry
1342 ; AVX-NEXT: subq $40, %rsp
1343 ; AVX-NEXT: .cfi_def_cfa_offset 48
1344 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1345 ; AVX-NEXT: movl $3, %edi
1346 ; AVX-NEXT: callq __powidf2@PLT
1347 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1348 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1349 ; AVX-NEXT: movl $3, %edi
1350 ; AVX-NEXT: callq __powidf2@PLT
1351 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1352 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1353 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
1354 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1355 ; AVX-NEXT: movl $3, %edi
1356 ; AVX-NEXT: vzeroupper
1357 ; AVX-NEXT: callq __powidf2@PLT
1358 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
1359 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1360 ; AVX-NEXT: addq $40, %rsp
1361 ; AVX-NEXT: .cfi_def_cfa_offset 8
1364 %powi = call <3 x double> @llvm.experimental.constrained.powi.v3f64(
1365 <3 x double> <double 42.0, double 42.1, double 42.2>,
1367 metadata !"round.dynamic",
1368 metadata !"fpexcept.strict") #0
1369 ret <3 x double> %powi
1372 define <4 x double> @constrained_vector_powi_v4f64() #0 {
1373 ; CHECK-LABEL: constrained_vector_powi_v4f64:
1374 ; CHECK: # %bb.0: # %entry
1375 ; CHECK-NEXT: subq $40, %rsp
1376 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1377 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1378 ; CHECK-NEXT: movl $3, %edi
1379 ; CHECK-NEXT: callq __powidf2@PLT
1380 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1381 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1382 ; CHECK-NEXT: movl $3, %edi
1383 ; CHECK-NEXT: callq __powidf2@PLT
1384 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1385 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1386 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1387 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1388 ; CHECK-NEXT: movl $3, %edi
1389 ; CHECK-NEXT: callq __powidf2@PLT
1390 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1391 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1392 ; CHECK-NEXT: movl $3, %edi
1393 ; CHECK-NEXT: callq __powidf2@PLT
1394 ; CHECK-NEXT: movaps %xmm0, %xmm1
1395 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1396 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1397 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1398 ; CHECK-NEXT: addq $40, %rsp
1399 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1402 ; AVX-LABEL: constrained_vector_powi_v4f64:
1403 ; AVX: # %bb.0: # %entry
1404 ; AVX-NEXT: subq $40, %rsp
1405 ; AVX-NEXT: .cfi_def_cfa_offset 48
1406 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1407 ; AVX-NEXT: movl $3, %edi
1408 ; AVX-NEXT: callq __powidf2@PLT
1409 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1410 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1411 ; AVX-NEXT: movl $3, %edi
1412 ; AVX-NEXT: callq __powidf2@PLT
1413 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1414 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1415 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1416 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1417 ; AVX-NEXT: movl $3, %edi
1418 ; AVX-NEXT: callq __powidf2@PLT
1419 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1420 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1421 ; AVX-NEXT: movl $3, %edi
1422 ; AVX-NEXT: callq __powidf2@PLT
1423 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1424 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1425 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
1426 ; AVX-NEXT: addq $40, %rsp
1427 ; AVX-NEXT: .cfi_def_cfa_offset 8
1430 %powi = call <4 x double> @llvm.experimental.constrained.powi.v4f64(
1431 <4 x double> <double 42.1, double 42.2,
1432 double 42.3, double 42.4>,
1434 metadata !"round.dynamic",
1435 metadata !"fpexcept.strict") #0
1436 ret <4 x double> %powi
1439 define <1 x float> @constrained_vector_sin_v1f32() #0 {
1440 ; CHECK-LABEL: constrained_vector_sin_v1f32:
1441 ; CHECK: # %bb.0: # %entry
1442 ; CHECK-NEXT: pushq %rax
1443 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1444 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1445 ; CHECK-NEXT: callq sinf@PLT
1446 ; CHECK-NEXT: popq %rax
1447 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1450 ; AVX-LABEL: constrained_vector_sin_v1f32:
1451 ; AVX: # %bb.0: # %entry
1452 ; AVX-NEXT: pushq %rax
1453 ; AVX-NEXT: .cfi_def_cfa_offset 16
1454 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1455 ; AVX-NEXT: callq sinf@PLT
1456 ; AVX-NEXT: popq %rax
1457 ; AVX-NEXT: .cfi_def_cfa_offset 8
1460 %sin = call <1 x float> @llvm.experimental.constrained.sin.v1f32(
1461 <1 x float> <float 42.0>,
1462 metadata !"round.dynamic",
1463 metadata !"fpexcept.strict") #0
1464 ret <1 x float> %sin
1467 define <2 x double> @constrained_vector_sin_v2f64() #0 {
1468 ; CHECK-LABEL: constrained_vector_sin_v2f64:
1469 ; CHECK: # %bb.0: # %entry
1470 ; CHECK-NEXT: subq $24, %rsp
1471 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1472 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1473 ; CHECK-NEXT: callq sin@PLT
1474 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1475 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1476 ; CHECK-NEXT: callq sin@PLT
1477 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1478 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1479 ; CHECK-NEXT: addq $24, %rsp
1480 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1483 ; AVX-LABEL: constrained_vector_sin_v2f64:
1484 ; AVX: # %bb.0: # %entry
1485 ; AVX-NEXT: subq $24, %rsp
1486 ; AVX-NEXT: .cfi_def_cfa_offset 32
1487 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1488 ; AVX-NEXT: callq sin@PLT
1489 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1490 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1491 ; AVX-NEXT: callq sin@PLT
1492 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1493 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1494 ; AVX-NEXT: addq $24, %rsp
1495 ; AVX-NEXT: .cfi_def_cfa_offset 8
1498 %sin = call <2 x double> @llvm.experimental.constrained.sin.v2f64(
1499 <2 x double> <double 42.0, double 42.1>,
1500 metadata !"round.dynamic",
1501 metadata !"fpexcept.strict") #0
1502 ret <2 x double> %sin
1505 define <3 x float> @constrained_vector_sin_v3f32() #0 {
1506 ; CHECK-LABEL: constrained_vector_sin_v3f32:
1507 ; CHECK: # %bb.0: # %entry
1508 ; CHECK-NEXT: subq $40, %rsp
1509 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1510 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1511 ; CHECK-NEXT: callq sinf@PLT
1512 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1513 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1514 ; CHECK-NEXT: callq sinf@PLT
1515 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1516 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1517 ; CHECK-NEXT: callq sinf@PLT
1518 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1519 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1520 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1521 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1522 ; CHECK-NEXT: movaps %xmm1, %xmm0
1523 ; CHECK-NEXT: addq $40, %rsp
1524 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1527 ; AVX-LABEL: constrained_vector_sin_v3f32:
1528 ; AVX: # %bb.0: # %entry
1529 ; AVX-NEXT: subq $40, %rsp
1530 ; AVX-NEXT: .cfi_def_cfa_offset 48
1531 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1532 ; AVX-NEXT: callq sinf@PLT
1533 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1534 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1535 ; AVX-NEXT: callq sinf@PLT
1536 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1537 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1538 ; AVX-NEXT: callq sinf@PLT
1539 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
1540 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
1541 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1542 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
1543 ; AVX-NEXT: addq $40, %rsp
1544 ; AVX-NEXT: .cfi_def_cfa_offset 8
1547 %sin = call <3 x float> @llvm.experimental.constrained.sin.v3f32(
1548 <3 x float> <float 42.0, float 43.0, float 44.0>,
1549 metadata !"round.dynamic",
1550 metadata !"fpexcept.strict") #0
1551 ret <3 x float> %sin
1554 define <3 x double> @constrained_vector_sin_v3f64() #0 {
1555 ; CHECK-LABEL: constrained_vector_sin_v3f64:
1556 ; CHECK: # %bb.0: # %entry
1557 ; CHECK-NEXT: subq $24, %rsp
1558 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1559 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1560 ; CHECK-NEXT: callq sin@PLT
1561 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1562 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1563 ; CHECK-NEXT: callq sin@PLT
1564 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1565 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1566 ; CHECK-NEXT: callq sin@PLT
1567 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1568 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1570 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
1571 ; CHECK-NEXT: # xmm0 = mem[0],zero
1572 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
1573 ; CHECK-NEXT: # xmm1 = mem[0],zero
1574 ; CHECK-NEXT: addq $24, %rsp
1575 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1578 ; AVX-LABEL: constrained_vector_sin_v3f64:
1579 ; AVX: # %bb.0: # %entry
1580 ; AVX-NEXT: subq $40, %rsp
1581 ; AVX-NEXT: .cfi_def_cfa_offset 48
1582 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1583 ; AVX-NEXT: callq sin@PLT
1584 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1585 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1586 ; AVX-NEXT: callq sin@PLT
1587 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1588 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1589 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
1590 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1591 ; AVX-NEXT: vzeroupper
1592 ; AVX-NEXT: callq sin@PLT
1593 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
1594 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1595 ; AVX-NEXT: addq $40, %rsp
1596 ; AVX-NEXT: .cfi_def_cfa_offset 8
1599 %sin = call <3 x double> @llvm.experimental.constrained.sin.v3f64(
1600 <3 x double> <double 42.0, double 42.1, double 42.2>,
1601 metadata !"round.dynamic",
1602 metadata !"fpexcept.strict") #0
1603 ret <3 x double> %sin
1606 define <4 x double> @constrained_vector_sin_v4f64() #0 {
1607 ; CHECK-LABEL: constrained_vector_sin_v4f64:
1608 ; CHECK: # %bb.0: # %entry
1609 ; CHECK-NEXT: subq $40, %rsp
1610 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1611 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1612 ; CHECK-NEXT: callq sin@PLT
1613 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1614 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1615 ; CHECK-NEXT: callq sin@PLT
1616 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1617 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1618 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1619 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1620 ; CHECK-NEXT: callq sin@PLT
1621 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1622 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1623 ; CHECK-NEXT: callq sin@PLT
1624 ; CHECK-NEXT: movaps %xmm0, %xmm1
1625 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1626 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1627 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1628 ; CHECK-NEXT: addq $40, %rsp
1629 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1632 ; AVX-LABEL: constrained_vector_sin_v4f64:
1633 ; AVX: # %bb.0: # %entry
1634 ; AVX-NEXT: subq $40, %rsp
1635 ; AVX-NEXT: .cfi_def_cfa_offset 48
1636 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1637 ; AVX-NEXT: callq sin@PLT
1638 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1639 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1640 ; AVX-NEXT: callq sin@PLT
1641 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1642 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1643 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1644 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1645 ; AVX-NEXT: callq sin@PLT
1646 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1647 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1648 ; AVX-NEXT: callq sin@PLT
1649 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1650 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1651 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
1652 ; AVX-NEXT: addq $40, %rsp
1653 ; AVX-NEXT: .cfi_def_cfa_offset 8
1656 %sin = call <4 x double> @llvm.experimental.constrained.sin.v4f64(
1657 <4 x double> <double 42.0, double 42.1,
1658 double 42.2, double 42.3>,
1659 metadata !"round.dynamic",
1660 metadata !"fpexcept.strict") #0
1661 ret <4 x double> %sin
1664 define <1 x float> @constrained_vector_cos_v1f32() #0 {
1665 ; CHECK-LABEL: constrained_vector_cos_v1f32:
1666 ; CHECK: # %bb.0: # %entry
1667 ; CHECK-NEXT: pushq %rax
1668 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1669 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1670 ; CHECK-NEXT: callq cosf@PLT
1671 ; CHECK-NEXT: popq %rax
1672 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1675 ; AVX-LABEL: constrained_vector_cos_v1f32:
1676 ; AVX: # %bb.0: # %entry
1677 ; AVX-NEXT: pushq %rax
1678 ; AVX-NEXT: .cfi_def_cfa_offset 16
1679 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1680 ; AVX-NEXT: callq cosf@PLT
1681 ; AVX-NEXT: popq %rax
1682 ; AVX-NEXT: .cfi_def_cfa_offset 8
1685 %cos = call <1 x float> @llvm.experimental.constrained.cos.v1f32(
1686 <1 x float> <float 42.0>,
1687 metadata !"round.dynamic",
1688 metadata !"fpexcept.strict") #0
1689 ret <1 x float> %cos
1692 define <2 x double> @constrained_vector_cos_v2f64() #0 {
1693 ; CHECK-LABEL: constrained_vector_cos_v2f64:
1694 ; CHECK: # %bb.0: # %entry
1695 ; CHECK-NEXT: subq $24, %rsp
1696 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1697 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1698 ; CHECK-NEXT: callq cos@PLT
1699 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1700 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1701 ; CHECK-NEXT: callq cos@PLT
1702 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1703 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1704 ; CHECK-NEXT: addq $24, %rsp
1705 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1708 ; AVX-LABEL: constrained_vector_cos_v2f64:
1709 ; AVX: # %bb.0: # %entry
1710 ; AVX-NEXT: subq $24, %rsp
1711 ; AVX-NEXT: .cfi_def_cfa_offset 32
1712 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1713 ; AVX-NEXT: callq cos@PLT
1714 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1715 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1716 ; AVX-NEXT: callq cos@PLT
1717 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1718 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1719 ; AVX-NEXT: addq $24, %rsp
1720 ; AVX-NEXT: .cfi_def_cfa_offset 8
1723 %cos = call <2 x double> @llvm.experimental.constrained.cos.v2f64(
1724 <2 x double> <double 42.0, double 42.1>,
1725 metadata !"round.dynamic",
1726 metadata !"fpexcept.strict") #0
1727 ret <2 x double> %cos
1730 define <3 x float> @constrained_vector_cos_v3f32() #0 {
1731 ; CHECK-LABEL: constrained_vector_cos_v3f32:
1732 ; CHECK: # %bb.0: # %entry
1733 ; CHECK-NEXT: subq $40, %rsp
1734 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1735 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1736 ; CHECK-NEXT: callq cosf@PLT
1737 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1738 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1739 ; CHECK-NEXT: callq cosf@PLT
1740 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1741 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1742 ; CHECK-NEXT: callq cosf@PLT
1743 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1744 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1745 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1746 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1747 ; CHECK-NEXT: movaps %xmm1, %xmm0
1748 ; CHECK-NEXT: addq $40, %rsp
1749 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1752 ; AVX-LABEL: constrained_vector_cos_v3f32:
1753 ; AVX: # %bb.0: # %entry
1754 ; AVX-NEXT: subq $40, %rsp
1755 ; AVX-NEXT: .cfi_def_cfa_offset 48
1756 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1757 ; AVX-NEXT: callq cosf@PLT
1758 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1759 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1760 ; AVX-NEXT: callq cosf@PLT
1761 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1762 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1763 ; AVX-NEXT: callq cosf@PLT
1764 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
1765 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
1766 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1767 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
1768 ; AVX-NEXT: addq $40, %rsp
1769 ; AVX-NEXT: .cfi_def_cfa_offset 8
1772 %cos = call <3 x float> @llvm.experimental.constrained.cos.v3f32(
1773 <3 x float> <float 42.0, float 43.0, float 44.0>,
1774 metadata !"round.dynamic",
1775 metadata !"fpexcept.strict") #0
1776 ret <3 x float> %cos
1779 define <3 x double> @constrained_vector_cos_v3f64() #0 {
1780 ; CHECK-LABEL: constrained_vector_cos_v3f64:
1781 ; CHECK: # %bb.0: # %entry
1782 ; CHECK-NEXT: subq $24, %rsp
1783 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1784 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1785 ; CHECK-NEXT: callq cos@PLT
1786 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1787 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1788 ; CHECK-NEXT: callq cos@PLT
1789 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1790 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1791 ; CHECK-NEXT: callq cos@PLT
1792 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1793 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1795 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
1796 ; CHECK-NEXT: # xmm0 = mem[0],zero
1797 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
1798 ; CHECK-NEXT: # xmm1 = mem[0],zero
1799 ; CHECK-NEXT: addq $24, %rsp
1800 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1803 ; AVX-LABEL: constrained_vector_cos_v3f64:
1804 ; AVX: # %bb.0: # %entry
1805 ; AVX-NEXT: subq $40, %rsp
1806 ; AVX-NEXT: .cfi_def_cfa_offset 48
1807 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1808 ; AVX-NEXT: callq cos@PLT
1809 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1810 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1811 ; AVX-NEXT: callq cos@PLT
1812 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1813 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1814 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
1815 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1816 ; AVX-NEXT: vzeroupper
1817 ; AVX-NEXT: callq cos@PLT
1818 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
1819 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1820 ; AVX-NEXT: addq $40, %rsp
1821 ; AVX-NEXT: .cfi_def_cfa_offset 8
1824 %cos = call <3 x double> @llvm.experimental.constrained.cos.v3f64(
1825 <3 x double> <double 42.0, double 42.1, double 42.2>,
1826 metadata !"round.dynamic",
1827 metadata !"fpexcept.strict") #0
1828 ret <3 x double> %cos
1831 define <4 x double> @constrained_vector_cos_v4f64() #0 {
1832 ; CHECK-LABEL: constrained_vector_cos_v4f64:
1833 ; CHECK: # %bb.0: # %entry
1834 ; CHECK-NEXT: subq $40, %rsp
1835 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1836 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1837 ; CHECK-NEXT: callq cos@PLT
1838 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1839 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1840 ; CHECK-NEXT: callq cos@PLT
1841 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1842 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1843 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1844 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1845 ; CHECK-NEXT: callq cos@PLT
1846 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1847 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1848 ; CHECK-NEXT: callq cos@PLT
1849 ; CHECK-NEXT: movaps %xmm0, %xmm1
1850 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1851 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1852 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1853 ; CHECK-NEXT: addq $40, %rsp
1854 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1857 ; AVX-LABEL: constrained_vector_cos_v4f64:
1858 ; AVX: # %bb.0: # %entry
1859 ; AVX-NEXT: subq $40, %rsp
1860 ; AVX-NEXT: .cfi_def_cfa_offset 48
1861 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1862 ; AVX-NEXT: callq cos@PLT
1863 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1864 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1865 ; AVX-NEXT: callq cos@PLT
1866 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1867 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1868 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1869 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1870 ; AVX-NEXT: callq cos@PLT
1871 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1872 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1873 ; AVX-NEXT: callq cos@PLT
1874 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1875 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1876 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
1877 ; AVX-NEXT: addq $40, %rsp
1878 ; AVX-NEXT: .cfi_def_cfa_offset 8
1881 %cos = call <4 x double> @llvm.experimental.constrained.cos.v4f64(
1882 <4 x double> <double 42.0, double 42.1,
1883 double 42.2, double 42.3>,
1884 metadata !"round.dynamic",
1885 metadata !"fpexcept.strict") #0
1886 ret <4 x double> %cos
1889 define <1 x float> @constrained_vector_exp_v1f32() #0 {
1890 ; CHECK-LABEL: constrained_vector_exp_v1f32:
1891 ; CHECK: # %bb.0: # %entry
1892 ; CHECK-NEXT: pushq %rax
1893 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1894 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1895 ; CHECK-NEXT: callq expf@PLT
1896 ; CHECK-NEXT: popq %rax
1897 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1900 ; AVX-LABEL: constrained_vector_exp_v1f32:
1901 ; AVX: # %bb.0: # %entry
1902 ; AVX-NEXT: pushq %rax
1903 ; AVX-NEXT: .cfi_def_cfa_offset 16
1904 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1905 ; AVX-NEXT: callq expf@PLT
1906 ; AVX-NEXT: popq %rax
1907 ; AVX-NEXT: .cfi_def_cfa_offset 8
1910 %exp = call <1 x float> @llvm.experimental.constrained.exp.v1f32(
1911 <1 x float> <float 42.0>,
1912 metadata !"round.dynamic",
1913 metadata !"fpexcept.strict") #0
1914 ret <1 x float> %exp
1917 define <2 x double> @constrained_vector_exp_v2f64() #0 {
1918 ; CHECK-LABEL: constrained_vector_exp_v2f64:
1919 ; CHECK: # %bb.0: # %entry
1920 ; CHECK-NEXT: subq $24, %rsp
1921 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1922 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1923 ; CHECK-NEXT: callq exp@PLT
1924 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1925 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1926 ; CHECK-NEXT: callq exp@PLT
1927 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1928 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1929 ; CHECK-NEXT: addq $24, %rsp
1930 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1933 ; AVX-LABEL: constrained_vector_exp_v2f64:
1934 ; AVX: # %bb.0: # %entry
1935 ; AVX-NEXT: subq $24, %rsp
1936 ; AVX-NEXT: .cfi_def_cfa_offset 32
1937 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1938 ; AVX-NEXT: callq exp@PLT
1939 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1940 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1941 ; AVX-NEXT: callq exp@PLT
1942 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
1943 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
1944 ; AVX-NEXT: addq $24, %rsp
1945 ; AVX-NEXT: .cfi_def_cfa_offset 8
1948 %exp = call <2 x double> @llvm.experimental.constrained.exp.v2f64(
1949 <2 x double> <double 42.0, double 42.1>,
1950 metadata !"round.dynamic",
1951 metadata !"fpexcept.strict") #0
1952 ret <2 x double> %exp
1955 define <3 x float> @constrained_vector_exp_v3f32() #0 {
1956 ; CHECK-LABEL: constrained_vector_exp_v3f32:
1957 ; CHECK: # %bb.0: # %entry
1958 ; CHECK-NEXT: subq $40, %rsp
1959 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1960 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1961 ; CHECK-NEXT: callq expf@PLT
1962 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1963 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1964 ; CHECK-NEXT: callq expf@PLT
1965 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1966 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1967 ; CHECK-NEXT: callq expf@PLT
1968 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1969 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1970 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1971 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1972 ; CHECK-NEXT: movaps %xmm1, %xmm0
1973 ; CHECK-NEXT: addq $40, %rsp
1974 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1977 ; AVX-LABEL: constrained_vector_exp_v3f32:
1978 ; AVX: # %bb.0: # %entry
1979 ; AVX-NEXT: subq $40, %rsp
1980 ; AVX-NEXT: .cfi_def_cfa_offset 48
1981 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1982 ; AVX-NEXT: callq expf@PLT
1983 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1984 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1985 ; AVX-NEXT: callq expf@PLT
1986 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
1987 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1988 ; AVX-NEXT: callq expf@PLT
1989 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
1990 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
1991 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
1992 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
1993 ; AVX-NEXT: addq $40, %rsp
1994 ; AVX-NEXT: .cfi_def_cfa_offset 8
1997 %exp = call <3 x float> @llvm.experimental.constrained.exp.v3f32(
1998 <3 x float> <float 42.0, float 43.0, float 44.0>,
1999 metadata !"round.dynamic",
2000 metadata !"fpexcept.strict") #0
2001 ret <3 x float> %exp
2004 define <3 x double> @constrained_vector_exp_v3f64() #0 {
2005 ; CHECK-LABEL: constrained_vector_exp_v3f64:
2006 ; CHECK: # %bb.0: # %entry
2007 ; CHECK-NEXT: subq $24, %rsp
2008 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2009 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2010 ; CHECK-NEXT: callq exp@PLT
2011 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2012 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2013 ; CHECK-NEXT: callq exp@PLT
2014 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2015 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2016 ; CHECK-NEXT: callq exp@PLT
2017 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2018 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2020 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
2021 ; CHECK-NEXT: # xmm0 = mem[0],zero
2022 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
2023 ; CHECK-NEXT: # xmm1 = mem[0],zero
2024 ; CHECK-NEXT: addq $24, %rsp
2025 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2028 ; AVX-LABEL: constrained_vector_exp_v3f64:
2029 ; AVX: # %bb.0: # %entry
2030 ; AVX-NEXT: subq $40, %rsp
2031 ; AVX-NEXT: .cfi_def_cfa_offset 48
2032 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2033 ; AVX-NEXT: callq exp@PLT
2034 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2035 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2036 ; AVX-NEXT: callq exp@PLT
2037 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2038 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2039 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
2040 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2041 ; AVX-NEXT: vzeroupper
2042 ; AVX-NEXT: callq exp@PLT
2043 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
2044 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2045 ; AVX-NEXT: addq $40, %rsp
2046 ; AVX-NEXT: .cfi_def_cfa_offset 8
2049 %exp = call <3 x double> @llvm.experimental.constrained.exp.v3f64(
2050 <3 x double> <double 42.0, double 42.1, double 42.2>,
2051 metadata !"round.dynamic",
2052 metadata !"fpexcept.strict") #0
2053 ret <3 x double> %exp
2056 define <4 x double> @constrained_vector_exp_v4f64() #0 {
2057 ; CHECK-LABEL: constrained_vector_exp_v4f64:
2058 ; CHECK: # %bb.0: # %entry
2059 ; CHECK-NEXT: subq $40, %rsp
2060 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2061 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2062 ; CHECK-NEXT: callq exp@PLT
2063 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2064 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2065 ; CHECK-NEXT: callq exp@PLT
2066 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2067 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2068 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2069 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2070 ; CHECK-NEXT: callq exp@PLT
2071 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2072 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2073 ; CHECK-NEXT: callq exp@PLT
2074 ; CHECK-NEXT: movaps %xmm0, %xmm1
2075 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2076 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2077 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2078 ; CHECK-NEXT: addq $40, %rsp
2079 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2082 ; AVX-LABEL: constrained_vector_exp_v4f64:
2083 ; AVX: # %bb.0: # %entry
2084 ; AVX-NEXT: subq $40, %rsp
2085 ; AVX-NEXT: .cfi_def_cfa_offset 48
2086 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2087 ; AVX-NEXT: callq exp@PLT
2088 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2089 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2090 ; AVX-NEXT: callq exp@PLT
2091 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2092 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2093 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2094 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2095 ; AVX-NEXT: callq exp@PLT
2096 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2097 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2098 ; AVX-NEXT: callq exp@PLT
2099 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2100 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2101 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
2102 ; AVX-NEXT: addq $40, %rsp
2103 ; AVX-NEXT: .cfi_def_cfa_offset 8
2106 %exp = call <4 x double> @llvm.experimental.constrained.exp.v4f64(
2107 <4 x double> <double 42.0, double 42.1,
2108 double 42.2, double 42.3>,
2109 metadata !"round.dynamic",
2110 metadata !"fpexcept.strict") #0
2111 ret <4 x double> %exp
2114 define <1 x float> @constrained_vector_exp2_v1f32() #0 {
2115 ; CHECK-LABEL: constrained_vector_exp2_v1f32:
2116 ; CHECK: # %bb.0: # %entry
2117 ; CHECK-NEXT: pushq %rax
2118 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2119 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2120 ; CHECK-NEXT: callq exp2f@PLT
2121 ; CHECK-NEXT: popq %rax
2122 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2125 ; AVX-LABEL: constrained_vector_exp2_v1f32:
2126 ; AVX: # %bb.0: # %entry
2127 ; AVX-NEXT: pushq %rax
2128 ; AVX-NEXT: .cfi_def_cfa_offset 16
2129 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2130 ; AVX-NEXT: callq exp2f@PLT
2131 ; AVX-NEXT: popq %rax
2132 ; AVX-NEXT: .cfi_def_cfa_offset 8
2135 %exp2 = call <1 x float> @llvm.experimental.constrained.exp2.v1f32(
2136 <1 x float> <float 42.0>,
2137 metadata !"round.dynamic",
2138 metadata !"fpexcept.strict") #0
2139 ret <1 x float> %exp2
2142 define <2 x double> @constrained_vector_exp2_v2f64() #0 {
2143 ; CHECK-LABEL: constrained_vector_exp2_v2f64:
2144 ; CHECK: # %bb.0: # %entry
2145 ; CHECK-NEXT: subq $24, %rsp
2146 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2147 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2148 ; CHECK-NEXT: callq exp2@PLT
2149 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2150 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2151 ; CHECK-NEXT: callq exp2@PLT
2152 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2153 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2154 ; CHECK-NEXT: addq $24, %rsp
2155 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2158 ; AVX-LABEL: constrained_vector_exp2_v2f64:
2159 ; AVX: # %bb.0: # %entry
2160 ; AVX-NEXT: subq $24, %rsp
2161 ; AVX-NEXT: .cfi_def_cfa_offset 32
2162 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2163 ; AVX-NEXT: callq exp2@PLT
2164 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2165 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2166 ; AVX-NEXT: callq exp2@PLT
2167 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2168 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2169 ; AVX-NEXT: addq $24, %rsp
2170 ; AVX-NEXT: .cfi_def_cfa_offset 8
2173 %exp2 = call <2 x double> @llvm.experimental.constrained.exp2.v2f64(
2174 <2 x double> <double 42.1, double 42.0>,
2175 metadata !"round.dynamic",
2176 metadata !"fpexcept.strict") #0
2177 ret <2 x double> %exp2
2180 define <3 x float> @constrained_vector_exp2_v3f32() #0 {
2181 ; CHECK-LABEL: constrained_vector_exp2_v3f32:
2182 ; CHECK: # %bb.0: # %entry
2183 ; CHECK-NEXT: subq $40, %rsp
2184 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2185 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2186 ; CHECK-NEXT: callq exp2f@PLT
2187 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2188 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2189 ; CHECK-NEXT: callq exp2f@PLT
2190 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2191 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2192 ; CHECK-NEXT: callq exp2f@PLT
2193 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2194 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2195 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2196 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2197 ; CHECK-NEXT: movaps %xmm1, %xmm0
2198 ; CHECK-NEXT: addq $40, %rsp
2199 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2202 ; AVX-LABEL: constrained_vector_exp2_v3f32:
2203 ; AVX: # %bb.0: # %entry
2204 ; AVX-NEXT: subq $40, %rsp
2205 ; AVX-NEXT: .cfi_def_cfa_offset 48
2206 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2207 ; AVX-NEXT: callq exp2f@PLT
2208 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2209 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2210 ; AVX-NEXT: callq exp2f@PLT
2211 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2212 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2213 ; AVX-NEXT: callq exp2f@PLT
2214 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
2215 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
2216 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2217 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
2218 ; AVX-NEXT: addq $40, %rsp
2219 ; AVX-NEXT: .cfi_def_cfa_offset 8
2222 %exp2 = call <3 x float> @llvm.experimental.constrained.exp2.v3f32(
2223 <3 x float> <float 42.0, float 43.0, float 44.0>,
2224 metadata !"round.dynamic",
2225 metadata !"fpexcept.strict") #0
2226 ret <3 x float> %exp2
2229 define <3 x double> @constrained_vector_exp2_v3f64() #0 {
2230 ; CHECK-LABEL: constrained_vector_exp2_v3f64:
2231 ; CHECK: # %bb.0: # %entry
2232 ; CHECK-NEXT: subq $24, %rsp
2233 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2234 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2235 ; CHECK-NEXT: callq exp2@PLT
2236 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2237 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2238 ; CHECK-NEXT: callq exp2@PLT
2239 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2240 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2241 ; CHECK-NEXT: callq exp2@PLT
2242 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2243 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2245 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
2246 ; CHECK-NEXT: # xmm0 = mem[0],zero
2247 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
2248 ; CHECK-NEXT: # xmm1 = mem[0],zero
2249 ; CHECK-NEXT: addq $24, %rsp
2250 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2253 ; AVX-LABEL: constrained_vector_exp2_v3f64:
2254 ; AVX: # %bb.0: # %entry
2255 ; AVX-NEXT: subq $40, %rsp
2256 ; AVX-NEXT: .cfi_def_cfa_offset 48
2257 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2258 ; AVX-NEXT: callq exp2@PLT
2259 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2260 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2261 ; AVX-NEXT: callq exp2@PLT
2262 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2263 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2264 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
2265 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2266 ; AVX-NEXT: vzeroupper
2267 ; AVX-NEXT: callq exp2@PLT
2268 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
2269 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2270 ; AVX-NEXT: addq $40, %rsp
2271 ; AVX-NEXT: .cfi_def_cfa_offset 8
2274 %exp2 = call <3 x double> @llvm.experimental.constrained.exp2.v3f64(
2275 <3 x double> <double 42.0, double 42.1, double 42.2>,
2276 metadata !"round.dynamic",
2277 metadata !"fpexcept.strict") #0
2278 ret <3 x double> %exp2
2281 define <4 x double> @constrained_vector_exp2_v4f64() #0 {
2282 ; CHECK-LABEL: constrained_vector_exp2_v4f64:
2283 ; CHECK: # %bb.0: # %entry
2284 ; CHECK-NEXT: subq $40, %rsp
2285 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2286 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2287 ; CHECK-NEXT: callq exp2@PLT
2288 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2289 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2290 ; CHECK-NEXT: callq exp2@PLT
2291 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2292 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2293 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2294 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2295 ; CHECK-NEXT: callq exp2@PLT
2296 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2297 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2298 ; CHECK-NEXT: callq exp2@PLT
2299 ; CHECK-NEXT: movaps %xmm0, %xmm1
2300 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2301 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2302 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2303 ; CHECK-NEXT: addq $40, %rsp
2304 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2307 ; AVX-LABEL: constrained_vector_exp2_v4f64:
2308 ; AVX: # %bb.0: # %entry
2309 ; AVX-NEXT: subq $40, %rsp
2310 ; AVX-NEXT: .cfi_def_cfa_offset 48
2311 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2312 ; AVX-NEXT: callq exp2@PLT
2313 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2314 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2315 ; AVX-NEXT: callq exp2@PLT
2316 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2317 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2318 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2319 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2320 ; AVX-NEXT: callq exp2@PLT
2321 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2322 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2323 ; AVX-NEXT: callq exp2@PLT
2324 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2325 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2326 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
2327 ; AVX-NEXT: addq $40, %rsp
2328 ; AVX-NEXT: .cfi_def_cfa_offset 8
2331 %exp2 = call <4 x double> @llvm.experimental.constrained.exp2.v4f64(
2332 <4 x double> <double 42.1, double 42.2,
2333 double 42.3, double 42.4>,
2334 metadata !"round.dynamic",
2335 metadata !"fpexcept.strict") #0
2336 ret <4 x double> %exp2
2339 define <1 x float> @constrained_vector_log_v1f32() #0 {
2340 ; CHECK-LABEL: constrained_vector_log_v1f32:
2341 ; CHECK: # %bb.0: # %entry
2342 ; CHECK-NEXT: pushq %rax
2343 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2344 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2345 ; CHECK-NEXT: callq logf@PLT
2346 ; CHECK-NEXT: popq %rax
2347 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2350 ; AVX-LABEL: constrained_vector_log_v1f32:
2351 ; AVX: # %bb.0: # %entry
2352 ; AVX-NEXT: pushq %rax
2353 ; AVX-NEXT: .cfi_def_cfa_offset 16
2354 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2355 ; AVX-NEXT: callq logf@PLT
2356 ; AVX-NEXT: popq %rax
2357 ; AVX-NEXT: .cfi_def_cfa_offset 8
2360 %log = call <1 x float> @llvm.experimental.constrained.log.v1f32(
2361 <1 x float> <float 42.0>,
2362 metadata !"round.dynamic",
2363 metadata !"fpexcept.strict") #0
2364 ret <1 x float> %log
2367 define <2 x double> @constrained_vector_log_v2f64() #0 {
2368 ; CHECK-LABEL: constrained_vector_log_v2f64:
2369 ; CHECK: # %bb.0: # %entry
2370 ; CHECK-NEXT: subq $24, %rsp
2371 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2372 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2373 ; CHECK-NEXT: callq log@PLT
2374 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2375 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2376 ; CHECK-NEXT: callq log@PLT
2377 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2378 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2379 ; CHECK-NEXT: addq $24, %rsp
2380 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2383 ; AVX-LABEL: constrained_vector_log_v2f64:
2384 ; AVX: # %bb.0: # %entry
2385 ; AVX-NEXT: subq $24, %rsp
2386 ; AVX-NEXT: .cfi_def_cfa_offset 32
2387 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2388 ; AVX-NEXT: callq log@PLT
2389 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2390 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2391 ; AVX-NEXT: callq log@PLT
2392 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2393 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2394 ; AVX-NEXT: addq $24, %rsp
2395 ; AVX-NEXT: .cfi_def_cfa_offset 8
2398 %log = call <2 x double> @llvm.experimental.constrained.log.v2f64(
2399 <2 x double> <double 42.0, double 42.1>,
2400 metadata !"round.dynamic",
2401 metadata !"fpexcept.strict") #0
2402 ret <2 x double> %log
2405 define <3 x float> @constrained_vector_log_v3f32() #0 {
2406 ; CHECK-LABEL: constrained_vector_log_v3f32:
2407 ; CHECK: # %bb.0: # %entry
2408 ; CHECK-NEXT: subq $40, %rsp
2409 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2410 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2411 ; CHECK-NEXT: callq logf@PLT
2412 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2413 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2414 ; CHECK-NEXT: callq logf@PLT
2415 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2416 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2417 ; CHECK-NEXT: callq logf@PLT
2418 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2419 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2420 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2421 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2422 ; CHECK-NEXT: movaps %xmm1, %xmm0
2423 ; CHECK-NEXT: addq $40, %rsp
2424 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2427 ; AVX-LABEL: constrained_vector_log_v3f32:
2428 ; AVX: # %bb.0: # %entry
2429 ; AVX-NEXT: subq $40, %rsp
2430 ; AVX-NEXT: .cfi_def_cfa_offset 48
2431 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2432 ; AVX-NEXT: callq logf@PLT
2433 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2434 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2435 ; AVX-NEXT: callq logf@PLT
2436 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2437 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2438 ; AVX-NEXT: callq logf@PLT
2439 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
2440 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
2441 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2442 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
2443 ; AVX-NEXT: addq $40, %rsp
2444 ; AVX-NEXT: .cfi_def_cfa_offset 8
2447 %log = call <3 x float> @llvm.experimental.constrained.log.v3f32(
2448 <3 x float> <float 42.0, float 43.0, float 44.0>,
2449 metadata !"round.dynamic",
2450 metadata !"fpexcept.strict") #0
2451 ret <3 x float> %log
2454 define <3 x double> @constrained_vector_log_v3f64() #0 {
2455 ; CHECK-LABEL: constrained_vector_log_v3f64:
2456 ; CHECK: # %bb.0: # %entry
2457 ; CHECK-NEXT: subq $24, %rsp
2458 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2459 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2460 ; CHECK-NEXT: callq log@PLT
2461 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2462 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2463 ; CHECK-NEXT: callq log@PLT
2464 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2465 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2466 ; CHECK-NEXT: callq log@PLT
2467 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2468 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2470 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
2471 ; CHECK-NEXT: # xmm0 = mem[0],zero
2472 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
2473 ; CHECK-NEXT: # xmm1 = mem[0],zero
2474 ; CHECK-NEXT: addq $24, %rsp
2475 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2478 ; AVX-LABEL: constrained_vector_log_v3f64:
2479 ; AVX: # %bb.0: # %entry
2480 ; AVX-NEXT: subq $40, %rsp
2481 ; AVX-NEXT: .cfi_def_cfa_offset 48
2482 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2483 ; AVX-NEXT: callq log@PLT
2484 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2485 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2486 ; AVX-NEXT: callq log@PLT
2487 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2488 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2489 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
2490 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2491 ; AVX-NEXT: vzeroupper
2492 ; AVX-NEXT: callq log@PLT
2493 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
2494 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2495 ; AVX-NEXT: addq $40, %rsp
2496 ; AVX-NEXT: .cfi_def_cfa_offset 8
2499 %log = call <3 x double> @llvm.experimental.constrained.log.v3f64(
2500 <3 x double> <double 42.0, double 42.1, double 42.2>,
2501 metadata !"round.dynamic",
2502 metadata !"fpexcept.strict") #0
2503 ret <3 x double> %log
2506 define <4 x double> @constrained_vector_log_v4f64() #0 {
2507 ; CHECK-LABEL: constrained_vector_log_v4f64:
2508 ; CHECK: # %bb.0: # %entry
2509 ; CHECK-NEXT: subq $40, %rsp
2510 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2511 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2512 ; CHECK-NEXT: callq log@PLT
2513 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2514 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2515 ; CHECK-NEXT: callq log@PLT
2516 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2517 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2518 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2519 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2520 ; CHECK-NEXT: callq log@PLT
2521 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2522 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2523 ; CHECK-NEXT: callq log@PLT
2524 ; CHECK-NEXT: movaps %xmm0, %xmm1
2525 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2526 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2527 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2528 ; CHECK-NEXT: addq $40, %rsp
2529 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2532 ; AVX-LABEL: constrained_vector_log_v4f64:
2533 ; AVX: # %bb.0: # %entry
2534 ; AVX-NEXT: subq $40, %rsp
2535 ; AVX-NEXT: .cfi_def_cfa_offset 48
2536 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2537 ; AVX-NEXT: callq log@PLT
2538 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2539 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2540 ; AVX-NEXT: callq log@PLT
2541 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2542 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2543 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2544 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2545 ; AVX-NEXT: callq log@PLT
2546 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2547 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2548 ; AVX-NEXT: callq log@PLT
2549 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2550 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2551 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
2552 ; AVX-NEXT: addq $40, %rsp
2553 ; AVX-NEXT: .cfi_def_cfa_offset 8
2556 %log = call <4 x double> @llvm.experimental.constrained.log.v4f64(
2557 <4 x double> <double 42.0, double 42.1,
2558 double 42.2, double 42.3>,
2559 metadata !"round.dynamic",
2560 metadata !"fpexcept.strict") #0
2561 ret <4 x double> %log
2564 define <1 x float> @constrained_vector_log10_v1f32() #0 {
2565 ; CHECK-LABEL: constrained_vector_log10_v1f32:
2566 ; CHECK: # %bb.0: # %entry
2567 ; CHECK-NEXT: pushq %rax
2568 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2569 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2570 ; CHECK-NEXT: callq log10f@PLT
2571 ; CHECK-NEXT: popq %rax
2572 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2575 ; AVX-LABEL: constrained_vector_log10_v1f32:
2576 ; AVX: # %bb.0: # %entry
2577 ; AVX-NEXT: pushq %rax
2578 ; AVX-NEXT: .cfi_def_cfa_offset 16
2579 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2580 ; AVX-NEXT: callq log10f@PLT
2581 ; AVX-NEXT: popq %rax
2582 ; AVX-NEXT: .cfi_def_cfa_offset 8
2585 %log10 = call <1 x float> @llvm.experimental.constrained.log10.v1f32(
2586 <1 x float> <float 42.0>,
2587 metadata !"round.dynamic",
2588 metadata !"fpexcept.strict") #0
2589 ret <1 x float> %log10
2592 define <2 x double> @constrained_vector_log10_v2f64() #0 {
2593 ; CHECK-LABEL: constrained_vector_log10_v2f64:
2594 ; CHECK: # %bb.0: # %entry
2595 ; CHECK-NEXT: subq $24, %rsp
2596 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2597 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2598 ; CHECK-NEXT: callq log10@PLT
2599 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2600 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2601 ; CHECK-NEXT: callq log10@PLT
2602 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2603 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2604 ; CHECK-NEXT: addq $24, %rsp
2605 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2608 ; AVX-LABEL: constrained_vector_log10_v2f64:
2609 ; AVX: # %bb.0: # %entry
2610 ; AVX-NEXT: subq $24, %rsp
2611 ; AVX-NEXT: .cfi_def_cfa_offset 32
2612 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2613 ; AVX-NEXT: callq log10@PLT
2614 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2615 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2616 ; AVX-NEXT: callq log10@PLT
2617 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2618 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2619 ; AVX-NEXT: addq $24, %rsp
2620 ; AVX-NEXT: .cfi_def_cfa_offset 8
2623 %log10 = call <2 x double> @llvm.experimental.constrained.log10.v2f64(
2624 <2 x double> <double 42.0, double 42.1>,
2625 metadata !"round.dynamic",
2626 metadata !"fpexcept.strict") #0
2627 ret <2 x double> %log10
2630 define <3 x float> @constrained_vector_log10_v3f32() #0 {
2631 ; CHECK-LABEL: constrained_vector_log10_v3f32:
2632 ; CHECK: # %bb.0: # %entry
2633 ; CHECK-NEXT: subq $40, %rsp
2634 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2635 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2636 ; CHECK-NEXT: callq log10f@PLT
2637 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2638 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2639 ; CHECK-NEXT: callq log10f@PLT
2640 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2641 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2642 ; CHECK-NEXT: callq log10f@PLT
2643 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2644 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2645 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2646 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2647 ; CHECK-NEXT: movaps %xmm1, %xmm0
2648 ; CHECK-NEXT: addq $40, %rsp
2649 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2652 ; AVX-LABEL: constrained_vector_log10_v3f32:
2653 ; AVX: # %bb.0: # %entry
2654 ; AVX-NEXT: subq $40, %rsp
2655 ; AVX-NEXT: .cfi_def_cfa_offset 48
2656 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2657 ; AVX-NEXT: callq log10f@PLT
2658 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2659 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2660 ; AVX-NEXT: callq log10f@PLT
2661 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2662 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2663 ; AVX-NEXT: callq log10f@PLT
2664 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
2665 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
2666 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2667 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
2668 ; AVX-NEXT: addq $40, %rsp
2669 ; AVX-NEXT: .cfi_def_cfa_offset 8
2672 %log10 = call <3 x float> @llvm.experimental.constrained.log10.v3f32(
2673 <3 x float> <float 42.0, float 43.0, float 44.0>,
2674 metadata !"round.dynamic",
2675 metadata !"fpexcept.strict") #0
2676 ret <3 x float> %log10
2679 define <3 x double> @constrained_vector_log10_v3f64() #0 {
2680 ; CHECK-LABEL: constrained_vector_log10_v3f64:
2681 ; CHECK: # %bb.0: # %entry
2682 ; CHECK-NEXT: subq $24, %rsp
2683 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2684 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2685 ; CHECK-NEXT: callq log10@PLT
2686 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2687 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2688 ; CHECK-NEXT: callq log10@PLT
2689 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2690 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2691 ; CHECK-NEXT: callq log10@PLT
2692 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2693 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2695 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
2696 ; CHECK-NEXT: # xmm0 = mem[0],zero
2697 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
2698 ; CHECK-NEXT: # xmm1 = mem[0],zero
2699 ; CHECK-NEXT: addq $24, %rsp
2700 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2703 ; AVX-LABEL: constrained_vector_log10_v3f64:
2704 ; AVX: # %bb.0: # %entry
2705 ; AVX-NEXT: subq $40, %rsp
2706 ; AVX-NEXT: .cfi_def_cfa_offset 48
2707 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2708 ; AVX-NEXT: callq log10@PLT
2709 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2710 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2711 ; AVX-NEXT: callq log10@PLT
2712 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2713 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2714 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
2715 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2716 ; AVX-NEXT: vzeroupper
2717 ; AVX-NEXT: callq log10@PLT
2718 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
2719 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2720 ; AVX-NEXT: addq $40, %rsp
2721 ; AVX-NEXT: .cfi_def_cfa_offset 8
2724 %log10 = call <3 x double> @llvm.experimental.constrained.log10.v3f64(
2725 <3 x double> <double 42.0, double 42.1, double 42.2>,
2726 metadata !"round.dynamic",
2727 metadata !"fpexcept.strict") #0
2728 ret <3 x double> %log10
2731 define <4 x double> @constrained_vector_log10_v4f64() #0 {
2732 ; CHECK-LABEL: constrained_vector_log10_v4f64:
2733 ; CHECK: # %bb.0: # %entry
2734 ; CHECK-NEXT: subq $40, %rsp
2735 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2736 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2737 ; CHECK-NEXT: callq log10@PLT
2738 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2739 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2740 ; CHECK-NEXT: callq log10@PLT
2741 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2742 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2743 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2744 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2745 ; CHECK-NEXT: callq log10@PLT
2746 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2747 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2748 ; CHECK-NEXT: callq log10@PLT
2749 ; CHECK-NEXT: movaps %xmm0, %xmm1
2750 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2751 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2752 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2753 ; CHECK-NEXT: addq $40, %rsp
2754 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2757 ; AVX-LABEL: constrained_vector_log10_v4f64:
2758 ; AVX: # %bb.0: # %entry
2759 ; AVX-NEXT: subq $40, %rsp
2760 ; AVX-NEXT: .cfi_def_cfa_offset 48
2761 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2762 ; AVX-NEXT: callq log10@PLT
2763 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2764 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2765 ; AVX-NEXT: callq log10@PLT
2766 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2767 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2768 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2769 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2770 ; AVX-NEXT: callq log10@PLT
2771 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2772 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2773 ; AVX-NEXT: callq log10@PLT
2774 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2775 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2776 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
2777 ; AVX-NEXT: addq $40, %rsp
2778 ; AVX-NEXT: .cfi_def_cfa_offset 8
2781 %log10 = call <4 x double> @llvm.experimental.constrained.log10.v4f64(
2782 <4 x double> <double 42.0, double 42.1,
2783 double 42.2, double 42.3>,
2784 metadata !"round.dynamic",
2785 metadata !"fpexcept.strict") #0
2786 ret <4 x double> %log10
2789 define <1 x float> @constrained_vector_log2_v1f32() #0 {
2790 ; CHECK-LABEL: constrained_vector_log2_v1f32:
2791 ; CHECK: # %bb.0: # %entry
2792 ; CHECK-NEXT: pushq %rax
2793 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2794 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2795 ; CHECK-NEXT: callq log2f@PLT
2796 ; CHECK-NEXT: popq %rax
2797 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2800 ; AVX-LABEL: constrained_vector_log2_v1f32:
2801 ; AVX: # %bb.0: # %entry
2802 ; AVX-NEXT: pushq %rax
2803 ; AVX-NEXT: .cfi_def_cfa_offset 16
2804 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2805 ; AVX-NEXT: callq log2f@PLT
2806 ; AVX-NEXT: popq %rax
2807 ; AVX-NEXT: .cfi_def_cfa_offset 8
2810 %log2 = call <1 x float> @llvm.experimental.constrained.log2.v1f32(
2811 <1 x float> <float 42.0>,
2812 metadata !"round.dynamic",
2813 metadata !"fpexcept.strict") #0
2814 ret <1 x float> %log2
2817 define <2 x double> @constrained_vector_log2_v2f64() #0 {
2818 ; CHECK-LABEL: constrained_vector_log2_v2f64:
2819 ; CHECK: # %bb.0: # %entry
2820 ; CHECK-NEXT: subq $24, %rsp
2821 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2822 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2823 ; CHECK-NEXT: callq log2@PLT
2824 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2825 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2826 ; CHECK-NEXT: callq log2@PLT
2827 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2828 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2829 ; CHECK-NEXT: addq $24, %rsp
2830 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2833 ; AVX-LABEL: constrained_vector_log2_v2f64:
2834 ; AVX: # %bb.0: # %entry
2835 ; AVX-NEXT: subq $24, %rsp
2836 ; AVX-NEXT: .cfi_def_cfa_offset 32
2837 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2838 ; AVX-NEXT: callq log2@PLT
2839 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2840 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2841 ; AVX-NEXT: callq log2@PLT
2842 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2843 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2844 ; AVX-NEXT: addq $24, %rsp
2845 ; AVX-NEXT: .cfi_def_cfa_offset 8
2848 %log2 = call <2 x double> @llvm.experimental.constrained.log2.v2f64(
2849 <2 x double> <double 42.0, double 42.1>,
2850 metadata !"round.dynamic",
2851 metadata !"fpexcept.strict") #0
2852 ret <2 x double> %log2
2855 define <3 x float> @constrained_vector_log2_v3f32() #0 {
2856 ; CHECK-LABEL: constrained_vector_log2_v3f32:
2857 ; CHECK: # %bb.0: # %entry
2858 ; CHECK-NEXT: subq $40, %rsp
2859 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2860 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2861 ; CHECK-NEXT: callq log2f@PLT
2862 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2863 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2864 ; CHECK-NEXT: callq log2f@PLT
2865 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2866 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2867 ; CHECK-NEXT: callq log2f@PLT
2868 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2869 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2870 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2871 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2872 ; CHECK-NEXT: movaps %xmm1, %xmm0
2873 ; CHECK-NEXT: addq $40, %rsp
2874 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2877 ; AVX-LABEL: constrained_vector_log2_v3f32:
2878 ; AVX: # %bb.0: # %entry
2879 ; AVX-NEXT: subq $40, %rsp
2880 ; AVX-NEXT: .cfi_def_cfa_offset 48
2881 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2882 ; AVX-NEXT: callq log2f@PLT
2883 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2884 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2885 ; AVX-NEXT: callq log2f@PLT
2886 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2887 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2888 ; AVX-NEXT: callq log2f@PLT
2889 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
2890 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
2891 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
2892 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
2893 ; AVX-NEXT: addq $40, %rsp
2894 ; AVX-NEXT: .cfi_def_cfa_offset 8
2897 %log2 = call <3 x float> @llvm.experimental.constrained.log2.v3f32(
2898 <3 x float> <float 42.0, float 43.0, float 44.0>,
2899 metadata !"round.dynamic",
2900 metadata !"fpexcept.strict") #0
2901 ret <3 x float> %log2
2904 define <3 x double> @constrained_vector_log2_v3f64() #0 {
2905 ; CHECK-LABEL: constrained_vector_log2_v3f64:
2906 ; CHECK: # %bb.0: # %entry
2907 ; CHECK-NEXT: subq $24, %rsp
2908 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2909 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2910 ; CHECK-NEXT: callq log2@PLT
2911 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2912 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2913 ; CHECK-NEXT: callq log2@PLT
2914 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2915 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2916 ; CHECK-NEXT: callq log2@PLT
2917 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2918 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2920 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
2921 ; CHECK-NEXT: # xmm0 = mem[0],zero
2922 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
2923 ; CHECK-NEXT: # xmm1 = mem[0],zero
2924 ; CHECK-NEXT: addq $24, %rsp
2925 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2928 ; AVX-LABEL: constrained_vector_log2_v3f64:
2929 ; AVX: # %bb.0: # %entry
2930 ; AVX-NEXT: subq $40, %rsp
2931 ; AVX-NEXT: .cfi_def_cfa_offset 48
2932 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2933 ; AVX-NEXT: callq log2@PLT
2934 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2935 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2936 ; AVX-NEXT: callq log2@PLT
2937 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2938 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2939 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
2940 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2941 ; AVX-NEXT: vzeroupper
2942 ; AVX-NEXT: callq log2@PLT
2943 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
2944 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2945 ; AVX-NEXT: addq $40, %rsp
2946 ; AVX-NEXT: .cfi_def_cfa_offset 8
2949 %log2 = call <3 x double> @llvm.experimental.constrained.log2.v3f64(
2950 <3 x double> <double 42.0, double 42.1, double 42.2>,
2951 metadata !"round.dynamic",
2952 metadata !"fpexcept.strict") #0
2953 ret <3 x double> %log2
2956 define <4 x double> @constrained_vector_log2_v4f64() #0 {
2957 ; CHECK-LABEL: constrained_vector_log2_v4f64:
2958 ; CHECK: # %bb.0: # %entry
2959 ; CHECK-NEXT: subq $40, %rsp
2960 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2961 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2962 ; CHECK-NEXT: callq log2@PLT
2963 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2964 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2965 ; CHECK-NEXT: callq log2@PLT
2966 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2967 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2968 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2969 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2970 ; CHECK-NEXT: callq log2@PLT
2971 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2972 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2973 ; CHECK-NEXT: callq log2@PLT
2974 ; CHECK-NEXT: movaps %xmm0, %xmm1
2975 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2976 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2977 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2978 ; CHECK-NEXT: addq $40, %rsp
2979 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2982 ; AVX-LABEL: constrained_vector_log2_v4f64:
2983 ; AVX: # %bb.0: # %entry
2984 ; AVX-NEXT: subq $40, %rsp
2985 ; AVX-NEXT: .cfi_def_cfa_offset 48
2986 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2987 ; AVX-NEXT: callq log2@PLT
2988 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2989 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2990 ; AVX-NEXT: callq log2@PLT
2991 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2992 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2993 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
2994 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2995 ; AVX-NEXT: callq log2@PLT
2996 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2997 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2998 ; AVX-NEXT: callq log2@PLT
2999 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
3000 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3001 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
3002 ; AVX-NEXT: addq $40, %rsp
3003 ; AVX-NEXT: .cfi_def_cfa_offset 8
3006 %log2 = call <4 x double> @llvm.experimental.constrained.log2.v4f64(
3007 <4 x double> <double 42.0, double 42.1,
3008 double 42.2, double 42.3>,
3009 metadata !"round.dynamic",
3010 metadata !"fpexcept.strict") #0
3011 ret <4 x double> %log2
3014 define <1 x float> @constrained_vector_rint_v1f32() #0 {
3015 ; CHECK-LABEL: constrained_vector_rint_v1f32:
3016 ; CHECK: # %bb.0: # %entry
3017 ; CHECK-NEXT: pushq %rax
3018 ; CHECK-NEXT: .cfi_def_cfa_offset 16
3019 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3020 ; CHECK-NEXT: callq rintf@PLT
3021 ; CHECK-NEXT: popq %rax
3022 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3025 ; AVX-LABEL: constrained_vector_rint_v1f32:
3026 ; AVX: # %bb.0: # %entry
3027 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3028 ; AVX-NEXT: vroundss $4, %xmm0, %xmm0, %xmm0
3031 %rint = call <1 x float> @llvm.experimental.constrained.rint.v1f32(
3032 <1 x float> <float 42.0>,
3033 metadata !"round.dynamic",
3034 metadata !"fpexcept.strict") #0
3035 ret <1 x float> %rint
3038 define <2 x double> @constrained_vector_rint_v2f64() #0 {
3039 ; CHECK-LABEL: constrained_vector_rint_v2f64:
3040 ; CHECK: # %bb.0: # %entry
3041 ; CHECK-NEXT: subq $24, %rsp
3042 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3043 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3044 ; CHECK-NEXT: callq rint@PLT
3045 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3046 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3047 ; CHECK-NEXT: callq rint@PLT
3048 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3049 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3050 ; CHECK-NEXT: addq $24, %rsp
3051 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3054 ; AVX-LABEL: constrained_vector_rint_v2f64:
3055 ; AVX: # %bb.0: # %entry
3056 ; AVX-NEXT: vroundpd $4, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3059 %rint = call <2 x double> @llvm.experimental.constrained.rint.v2f64(
3060 <2 x double> <double 42.1, double 42.0>,
3061 metadata !"round.dynamic",
3062 metadata !"fpexcept.strict") #0
3063 ret <2 x double> %rint
3066 define <3 x float> @constrained_vector_rint_v3f32() #0 {
3067 ; CHECK-LABEL: constrained_vector_rint_v3f32:
3068 ; CHECK: # %bb.0: # %entry
3069 ; CHECK-NEXT: subq $40, %rsp
3070 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3071 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3072 ; CHECK-NEXT: callq rintf@PLT
3073 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3074 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3075 ; CHECK-NEXT: callq rintf@PLT
3076 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3077 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3078 ; CHECK-NEXT: callq rintf@PLT
3079 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
3080 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
3081 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3082 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3083 ; CHECK-NEXT: movaps %xmm1, %xmm0
3084 ; CHECK-NEXT: addq $40, %rsp
3085 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3088 ; AVX-LABEL: constrained_vector_rint_v3f32:
3089 ; AVX: # %bb.0: # %entry
3090 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3091 ; AVX-NEXT: vroundss $4, %xmm0, %xmm0, %xmm0
3092 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3093 ; AVX-NEXT: vroundss $4, %xmm1, %xmm1, %xmm1
3094 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
3095 ; AVX-NEXT: vroundss $4, %xmm2, %xmm2, %xmm2
3096 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
3097 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
3100 %rint = call <3 x float> @llvm.experimental.constrained.rint.v3f32(
3101 <3 x float> <float 42.0, float 43.0, float 44.0>,
3102 metadata !"round.dynamic",
3103 metadata !"fpexcept.strict") #0
3104 ret <3 x float> %rint
3107 define <3 x double> @constrained_vector_rint_v3f64() #0 {
3108 ; CHECK-LABEL: constrained_vector_rint_v3f64:
3109 ; CHECK: # %bb.0: # %entry
3110 ; CHECK-NEXT: subq $24, %rsp
3111 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3112 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3113 ; CHECK-NEXT: callq rint@PLT
3114 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
3115 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3116 ; CHECK-NEXT: callq rint@PLT
3117 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
3118 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3119 ; CHECK-NEXT: callq rint@PLT
3120 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
3121 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
3123 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
3124 ; CHECK-NEXT: # xmm0 = mem[0],zero
3125 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
3126 ; CHECK-NEXT: # xmm1 = mem[0],zero
3127 ; CHECK-NEXT: addq $24, %rsp
3128 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3131 ; AVX-LABEL: constrained_vector_rint_v3f64:
3132 ; AVX: # %bb.0: # %entry
3133 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3134 ; AVX-NEXT: vroundsd $4, %xmm0, %xmm0, %xmm0
3135 ; AVX-NEXT: vroundpd $4, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
3136 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3139 %rint = call <3 x double> @llvm.experimental.constrained.rint.v3f64(
3140 <3 x double> <double 42.0, double 42.1, double 42.2>,
3141 metadata !"round.dynamic",
3142 metadata !"fpexcept.strict") #0
3143 ret <3 x double> %rint
3146 define <4 x double> @constrained_vector_rint_v4f64() #0 {
3147 ; CHECK-LABEL: constrained_vector_rint_v4f64:
3148 ; CHECK: # %bb.0: # %entry
3149 ; CHECK-NEXT: subq $40, %rsp
3150 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3151 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3152 ; CHECK-NEXT: callq rint@PLT
3153 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3154 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3155 ; CHECK-NEXT: callq rint@PLT
3156 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3157 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3158 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3159 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3160 ; CHECK-NEXT: callq rint@PLT
3161 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3162 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3163 ; CHECK-NEXT: callq rint@PLT
3164 ; CHECK-NEXT: movaps %xmm0, %xmm1
3165 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3166 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3167 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
3168 ; CHECK-NEXT: addq $40, %rsp
3169 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3172 ; AVX-LABEL: constrained_vector_rint_v4f64:
3173 ; AVX: # %bb.0: # %entry
3174 ; AVX-NEXT: vroundpd $4, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0
3177 %rint = call <4 x double> @llvm.experimental.constrained.rint.v4f64(
3178 <4 x double> <double 42.1, double 42.2,
3179 double 42.3, double 42.4>,
3180 metadata !"round.dynamic",
3181 metadata !"fpexcept.strict") #0
3182 ret <4 x double> %rint
3185 define <1 x float> @constrained_vector_nearbyint_v1f32() #0 {
3186 ; CHECK-LABEL: constrained_vector_nearbyint_v1f32:
3187 ; CHECK: # %bb.0: # %entry
3188 ; CHECK-NEXT: pushq %rax
3189 ; CHECK-NEXT: .cfi_def_cfa_offset 16
3190 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3191 ; CHECK-NEXT: callq nearbyintf@PLT
3192 ; CHECK-NEXT: popq %rax
3193 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3196 ; AVX-LABEL: constrained_vector_nearbyint_v1f32:
3197 ; AVX: # %bb.0: # %entry
3198 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3199 ; AVX-NEXT: vroundss $12, %xmm0, %xmm0, %xmm0
3202 %nearby = call <1 x float> @llvm.experimental.constrained.nearbyint.v1f32(
3203 <1 x float> <float 42.0>,
3204 metadata !"round.dynamic",
3205 metadata !"fpexcept.strict") #0
3206 ret <1 x float> %nearby
3209 define <2 x double> @constrained_vector_nearbyint_v2f64() #0 {
3210 ; CHECK-LABEL: constrained_vector_nearbyint_v2f64:
3211 ; CHECK: # %bb.0: # %entry
3212 ; CHECK-NEXT: subq $24, %rsp
3213 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3214 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3215 ; CHECK-NEXT: callq nearbyint@PLT
3216 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3217 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3218 ; CHECK-NEXT: callq nearbyint@PLT
3219 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3220 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3221 ; CHECK-NEXT: addq $24, %rsp
3222 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3225 ; AVX-LABEL: constrained_vector_nearbyint_v2f64:
3226 ; AVX: # %bb.0: # %entry
3227 ; AVX-NEXT: vroundpd $12, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3230 %nearby = call <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(
3231 <2 x double> <double 42.1, double 42.0>,
3232 metadata !"round.dynamic",
3233 metadata !"fpexcept.strict") #0
3234 ret <2 x double> %nearby
3237 define <3 x float> @constrained_vector_nearbyint_v3f32() #0 {
3238 ; CHECK-LABEL: constrained_vector_nearbyint_v3f32:
3239 ; CHECK: # %bb.0: # %entry
3240 ; CHECK-NEXT: subq $40, %rsp
3241 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3242 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3243 ; CHECK-NEXT: callq nearbyintf@PLT
3244 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3245 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3246 ; CHECK-NEXT: callq nearbyintf@PLT
3247 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3248 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3249 ; CHECK-NEXT: callq nearbyintf@PLT
3250 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
3251 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
3252 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3253 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3254 ; CHECK-NEXT: movaps %xmm1, %xmm0
3255 ; CHECK-NEXT: addq $40, %rsp
3256 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3259 ; AVX-LABEL: constrained_vector_nearbyint_v3f32:
3260 ; AVX: # %bb.0: # %entry
3261 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3262 ; AVX-NEXT: vroundss $12, %xmm0, %xmm0, %xmm0
3263 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3264 ; AVX-NEXT: vroundss $12, %xmm1, %xmm1, %xmm1
3265 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
3266 ; AVX-NEXT: vroundss $12, %xmm2, %xmm2, %xmm2
3267 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
3268 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
3271 %nearby = call <3 x float> @llvm.experimental.constrained.nearbyint.v3f32(
3272 <3 x float> <float 42.0, float 43.0, float 44.0>,
3273 metadata !"round.dynamic",
3274 metadata !"fpexcept.strict") #0
3275 ret <3 x float> %nearby
3278 define <3 x double> @constrained_vector_nearby_v3f64() #0 {
3279 ; CHECK-LABEL: constrained_vector_nearby_v3f64:
3280 ; CHECK: # %bb.0: # %entry
3281 ; CHECK-NEXT: subq $24, %rsp
3282 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3283 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3284 ; CHECK-NEXT: callq nearbyint@PLT
3285 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
3286 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3287 ; CHECK-NEXT: callq nearbyint@PLT
3288 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
3289 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3290 ; CHECK-NEXT: callq nearbyint@PLT
3291 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
3292 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
3294 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
3295 ; CHECK-NEXT: # xmm0 = mem[0],zero
3296 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
3297 ; CHECK-NEXT: # xmm1 = mem[0],zero
3298 ; CHECK-NEXT: addq $24, %rsp
3299 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3302 ; AVX-LABEL: constrained_vector_nearby_v3f64:
3303 ; AVX: # %bb.0: # %entry
3304 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3305 ; AVX-NEXT: vroundsd $12, %xmm0, %xmm0, %xmm0
3306 ; AVX-NEXT: vroundpd $12, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
3307 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3310 %nearby = call <3 x double> @llvm.experimental.constrained.nearbyint.v3f64(
3311 <3 x double> <double 42.0, double 42.1, double 42.2>,
3312 metadata !"round.dynamic",
3313 metadata !"fpexcept.strict") #0
3314 ret <3 x double> %nearby
3317 define <4 x double> @constrained_vector_nearbyint_v4f64() #0 {
3318 ; CHECK-LABEL: constrained_vector_nearbyint_v4f64:
3319 ; CHECK: # %bb.0: # %entry
3320 ; CHECK-NEXT: subq $40, %rsp
3321 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3322 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3323 ; CHECK-NEXT: callq nearbyint@PLT
3324 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3325 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3326 ; CHECK-NEXT: callq nearbyint@PLT
3327 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3328 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3329 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3330 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3331 ; CHECK-NEXT: callq nearbyint@PLT
3332 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3333 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3334 ; CHECK-NEXT: callq nearbyint@PLT
3335 ; CHECK-NEXT: movaps %xmm0, %xmm1
3336 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3337 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3338 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
3339 ; CHECK-NEXT: addq $40, %rsp
3340 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3343 ; AVX-LABEL: constrained_vector_nearbyint_v4f64:
3344 ; AVX: # %bb.0: # %entry
3345 ; AVX-NEXT: vroundpd $12, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0
3348 %nearby = call <4 x double> @llvm.experimental.constrained.nearbyint.v4f64(
3349 <4 x double> <double 42.1, double 42.2,
3350 double 42.3, double 42.4>,
3351 metadata !"round.dynamic",
3352 metadata !"fpexcept.strict") #0
3353 ret <4 x double> %nearby
3356 define <1 x float> @constrained_vector_maxnum_v1f32() #0 {
3357 ; CHECK-LABEL: constrained_vector_maxnum_v1f32:
3358 ; CHECK: # %bb.0: # %entry
3359 ; CHECK-NEXT: pushq %rax
3360 ; CHECK-NEXT: .cfi_def_cfa_offset 16
3361 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3362 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3363 ; CHECK-NEXT: callq fmaxf@PLT
3364 ; CHECK-NEXT: popq %rax
3365 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3368 ; AVX-LABEL: constrained_vector_maxnum_v1f32:
3369 ; AVX: # %bb.0: # %entry
3370 ; AVX-NEXT: pushq %rax
3371 ; AVX-NEXT: .cfi_def_cfa_offset 16
3372 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3373 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3374 ; AVX-NEXT: callq fmaxf@PLT
3375 ; AVX-NEXT: popq %rax
3376 ; AVX-NEXT: .cfi_def_cfa_offset 8
3379 %max = call <1 x float> @llvm.experimental.constrained.maxnum.v1f32(
3380 <1 x float> <float 42.0>, <1 x float> <float 41.0>,
3381 metadata !"fpexcept.strict") #0
3382 ret <1 x float> %max
3385 define <2 x double> @constrained_vector_maxnum_v2f64() #0 {
3386 ; CHECK-LABEL: constrained_vector_maxnum_v2f64:
3387 ; CHECK: # %bb.0: # %entry
3388 ; CHECK-NEXT: subq $24, %rsp
3389 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3390 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3391 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3392 ; CHECK-NEXT: callq fmax@PLT
3393 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3394 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3395 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3396 ; CHECK-NEXT: callq fmax@PLT
3397 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3398 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3399 ; CHECK-NEXT: addq $24, %rsp
3400 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3403 ; AVX-LABEL: constrained_vector_maxnum_v2f64:
3404 ; AVX: # %bb.0: # %entry
3405 ; AVX-NEXT: subq $24, %rsp
3406 ; AVX-NEXT: .cfi_def_cfa_offset 32
3407 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3408 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3409 ; AVX-NEXT: callq fmax@PLT
3410 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3411 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3412 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3413 ; AVX-NEXT: callq fmax@PLT
3414 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3415 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3416 ; AVX-NEXT: addq $24, %rsp
3417 ; AVX-NEXT: .cfi_def_cfa_offset 8
3420 %max = call <2 x double> @llvm.experimental.constrained.maxnum.v2f64(
3421 <2 x double> <double 43.0, double 42.0>,
3422 <2 x double> <double 41.0, double 40.0>,
3423 metadata !"fpexcept.strict") #0
3424 ret <2 x double> %max
3427 define <3 x float> @constrained_vector_maxnum_v3f32() #0 {
3428 ; CHECK-LABEL: constrained_vector_maxnum_v3f32:
3429 ; CHECK: # %bb.0: # %entry
3430 ; CHECK-NEXT: subq $40, %rsp
3431 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3432 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3433 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3434 ; CHECK-NEXT: callq fmaxf@PLT
3435 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3436 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3437 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3438 ; CHECK-NEXT: callq fmaxf@PLT
3439 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3440 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3441 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3442 ; CHECK-NEXT: callq fmaxf@PLT
3443 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
3444 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
3445 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3446 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3447 ; CHECK-NEXT: movaps %xmm1, %xmm0
3448 ; CHECK-NEXT: addq $40, %rsp
3449 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3452 ; AVX-LABEL: constrained_vector_maxnum_v3f32:
3453 ; AVX: # %bb.0: # %entry
3454 ; AVX-NEXT: subq $40, %rsp
3455 ; AVX-NEXT: .cfi_def_cfa_offset 48
3456 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3457 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3458 ; AVX-NEXT: callq fmaxf@PLT
3459 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3460 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3461 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3462 ; AVX-NEXT: callq fmaxf@PLT
3463 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3464 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3465 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3466 ; AVX-NEXT: callq fmaxf@PLT
3467 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
3468 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
3469 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
3470 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
3471 ; AVX-NEXT: addq $40, %rsp
3472 ; AVX-NEXT: .cfi_def_cfa_offset 8
3475 %max = call <3 x float> @llvm.experimental.constrained.maxnum.v3f32(
3476 <3 x float> <float 43.0, float 44.0, float 45.0>,
3477 <3 x float> <float 41.0, float 42.0, float 43.0>,
3478 metadata !"fpexcept.strict") #0
3479 ret <3 x float> %max
3482 define <3 x double> @constrained_vector_max_v3f64() #0 {
3483 ; CHECK-LABEL: constrained_vector_max_v3f64:
3484 ; CHECK: # %bb.0: # %entry
3485 ; CHECK-NEXT: subq $24, %rsp
3486 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3487 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3488 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3489 ; CHECK-NEXT: callq fmax@PLT
3490 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
3491 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3492 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3493 ; CHECK-NEXT: callq fmax@PLT
3494 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
3495 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3496 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3497 ; CHECK-NEXT: callq fmax@PLT
3498 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
3499 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
3501 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
3502 ; CHECK-NEXT: # xmm0 = mem[0],zero
3503 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
3504 ; CHECK-NEXT: # xmm1 = mem[0],zero
3505 ; CHECK-NEXT: addq $24, %rsp
3506 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3509 ; AVX-LABEL: constrained_vector_max_v3f64:
3510 ; AVX: # %bb.0: # %entry
3511 ; AVX-NEXT: subq $40, %rsp
3512 ; AVX-NEXT: .cfi_def_cfa_offset 48
3513 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3514 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3515 ; AVX-NEXT: callq fmax@PLT
3516 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3517 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3518 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3519 ; AVX-NEXT: callq fmax@PLT
3520 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3521 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3522 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
3523 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3524 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3525 ; AVX-NEXT: vzeroupper
3526 ; AVX-NEXT: callq fmax@PLT
3527 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
3528 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3529 ; AVX-NEXT: addq $40, %rsp
3530 ; AVX-NEXT: .cfi_def_cfa_offset 8
3533 %max = call <3 x double> @llvm.experimental.constrained.maxnum.v3f64(
3534 <3 x double> <double 43.0, double 44.0, double 45.0>,
3535 <3 x double> <double 40.0, double 41.0, double 42.0>,
3536 metadata !"fpexcept.strict") #0
3537 ret <3 x double> %max
3540 define <4 x double> @constrained_vector_maxnum_v4f64() #0 {
3541 ; CHECK-LABEL: constrained_vector_maxnum_v4f64:
3542 ; CHECK: # %bb.0: # %entry
3543 ; CHECK-NEXT: subq $40, %rsp
3544 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3545 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3546 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3547 ; CHECK-NEXT: callq fmax@PLT
3548 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3549 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3550 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3551 ; CHECK-NEXT: callq fmax@PLT
3552 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3553 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3554 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3555 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3556 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3557 ; CHECK-NEXT: callq fmax@PLT
3558 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3559 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3560 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3561 ; CHECK-NEXT: callq fmax@PLT
3562 ; CHECK-NEXT: movaps %xmm0, %xmm1
3563 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3564 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3565 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
3566 ; CHECK-NEXT: addq $40, %rsp
3567 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3570 ; AVX-LABEL: constrained_vector_maxnum_v4f64:
3571 ; AVX: # %bb.0: # %entry
3572 ; AVX-NEXT: subq $40, %rsp
3573 ; AVX-NEXT: .cfi_def_cfa_offset 48
3574 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3575 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3576 ; AVX-NEXT: callq fmax@PLT
3577 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3578 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3579 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3580 ; AVX-NEXT: callq fmax@PLT
3581 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3582 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3583 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3584 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3585 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3586 ; AVX-NEXT: callq fmax@PLT
3587 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3588 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3589 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3590 ; AVX-NEXT: callq fmax@PLT
3591 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
3592 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3593 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
3594 ; AVX-NEXT: addq $40, %rsp
3595 ; AVX-NEXT: .cfi_def_cfa_offset 8
3598 %max = call <4 x double> @llvm.experimental.constrained.maxnum.v4f64(
3599 <4 x double> <double 44.0, double 45.0,
3600 double 46.0, double 47.0>,
3601 <4 x double> <double 40.0, double 41.0,
3602 double 42.0, double 43.0>,
3603 metadata !"fpexcept.strict") #0
3604 ret <4 x double> %max
3607 define <1 x float> @constrained_vector_minnum_v1f32() #0 {
3608 ; CHECK-LABEL: constrained_vector_minnum_v1f32:
3609 ; CHECK: # %bb.0: # %entry
3610 ; CHECK-NEXT: pushq %rax
3611 ; CHECK-NEXT: .cfi_def_cfa_offset 16
3612 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3613 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3614 ; CHECK-NEXT: callq fminf@PLT
3615 ; CHECK-NEXT: popq %rax
3616 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3619 ; AVX-LABEL: constrained_vector_minnum_v1f32:
3620 ; AVX: # %bb.0: # %entry
3621 ; AVX-NEXT: pushq %rax
3622 ; AVX-NEXT: .cfi_def_cfa_offset 16
3623 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3624 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3625 ; AVX-NEXT: callq fminf@PLT
3626 ; AVX-NEXT: popq %rax
3627 ; AVX-NEXT: .cfi_def_cfa_offset 8
3630 %min = call <1 x float> @llvm.experimental.constrained.minnum.v1f32(
3631 <1 x float> <float 42.0>, <1 x float> <float 41.0>,
3632 metadata !"fpexcept.strict") #0
3633 ret <1 x float> %min
3636 define <2 x double> @constrained_vector_minnum_v2f64() #0 {
3637 ; CHECK-LABEL: constrained_vector_minnum_v2f64:
3638 ; CHECK: # %bb.0: # %entry
3639 ; CHECK-NEXT: subq $24, %rsp
3640 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3641 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3642 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3643 ; CHECK-NEXT: callq fmin@PLT
3644 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3645 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3646 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3647 ; CHECK-NEXT: callq fmin@PLT
3648 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3649 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3650 ; CHECK-NEXT: addq $24, %rsp
3651 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3654 ; AVX-LABEL: constrained_vector_minnum_v2f64:
3655 ; AVX: # %bb.0: # %entry
3656 ; AVX-NEXT: subq $24, %rsp
3657 ; AVX-NEXT: .cfi_def_cfa_offset 32
3658 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3659 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3660 ; AVX-NEXT: callq fmin@PLT
3661 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3662 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3663 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3664 ; AVX-NEXT: callq fmin@PLT
3665 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3666 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3667 ; AVX-NEXT: addq $24, %rsp
3668 ; AVX-NEXT: .cfi_def_cfa_offset 8
3671 %min = call <2 x double> @llvm.experimental.constrained.minnum.v2f64(
3672 <2 x double> <double 43.0, double 42.0>,
3673 <2 x double> <double 41.0, double 40.0>,
3674 metadata !"fpexcept.strict") #0
3675 ret <2 x double> %min
3678 define <3 x float> @constrained_vector_minnum_v3f32() #0 {
3679 ; CHECK-LABEL: constrained_vector_minnum_v3f32:
3680 ; CHECK: # %bb.0: # %entry
3681 ; CHECK-NEXT: subq $40, %rsp
3682 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3683 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3684 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3685 ; CHECK-NEXT: callq fminf@PLT
3686 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3687 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3688 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3689 ; CHECK-NEXT: callq fminf@PLT
3690 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3691 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3692 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3693 ; CHECK-NEXT: callq fminf@PLT
3694 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
3695 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
3696 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3697 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3698 ; CHECK-NEXT: movaps %xmm1, %xmm0
3699 ; CHECK-NEXT: addq $40, %rsp
3700 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3703 ; AVX-LABEL: constrained_vector_minnum_v3f32:
3704 ; AVX: # %bb.0: # %entry
3705 ; AVX-NEXT: subq $40, %rsp
3706 ; AVX-NEXT: .cfi_def_cfa_offset 48
3707 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3708 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3709 ; AVX-NEXT: callq fminf@PLT
3710 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3711 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3712 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3713 ; AVX-NEXT: callq fminf@PLT
3714 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3715 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3716 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3717 ; AVX-NEXT: callq fminf@PLT
3718 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
3719 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
3720 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
3721 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
3722 ; AVX-NEXT: addq $40, %rsp
3723 ; AVX-NEXT: .cfi_def_cfa_offset 8
3726 %min = call <3 x float> @llvm.experimental.constrained.minnum.v3f32(
3727 <3 x float> <float 43.0, float 44.0, float 45.0>,
3728 <3 x float> <float 41.0, float 42.0, float 43.0>,
3729 metadata !"fpexcept.strict") #0
3730 ret <3 x float> %min
3733 define <3 x double> @constrained_vector_min_v3f64() #0 {
3734 ; CHECK-LABEL: constrained_vector_min_v3f64:
3735 ; CHECK: # %bb.0: # %entry
3736 ; CHECK-NEXT: subq $24, %rsp
3737 ; CHECK-NEXT: .cfi_def_cfa_offset 32
3738 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3739 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3740 ; CHECK-NEXT: callq fmin@PLT
3741 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
3742 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3743 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3744 ; CHECK-NEXT: callq fmin@PLT
3745 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
3746 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3747 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3748 ; CHECK-NEXT: callq fmin@PLT
3749 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
3750 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
3752 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
3753 ; CHECK-NEXT: # xmm0 = mem[0],zero
3754 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
3755 ; CHECK-NEXT: # xmm1 = mem[0],zero
3756 ; CHECK-NEXT: addq $24, %rsp
3757 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3760 ; AVX-LABEL: constrained_vector_min_v3f64:
3761 ; AVX: # %bb.0: # %entry
3762 ; AVX-NEXT: subq $40, %rsp
3763 ; AVX-NEXT: .cfi_def_cfa_offset 48
3764 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3765 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3766 ; AVX-NEXT: callq fmin@PLT
3767 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3768 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3769 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3770 ; AVX-NEXT: callq fmin@PLT
3771 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3772 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3773 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
3774 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3775 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3776 ; AVX-NEXT: vzeroupper
3777 ; AVX-NEXT: callq fmin@PLT
3778 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
3779 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3780 ; AVX-NEXT: addq $40, %rsp
3781 ; AVX-NEXT: .cfi_def_cfa_offset 8
3784 %min = call <3 x double> @llvm.experimental.constrained.minnum.v3f64(
3785 <3 x double> <double 43.0, double 44.0, double 45.0>,
3786 <3 x double> <double 40.0, double 41.0, double 42.0>,
3787 metadata !"fpexcept.strict") #0
3788 ret <3 x double> %min
3791 define <4 x double> @constrained_vector_minnum_v4f64() #0 {
3792 ; CHECK-LABEL: constrained_vector_minnum_v4f64:
3793 ; CHECK: # %bb.0: # %entry
3794 ; CHECK-NEXT: subq $40, %rsp
3795 ; CHECK-NEXT: .cfi_def_cfa_offset 48
3796 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3797 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3798 ; CHECK-NEXT: callq fmin@PLT
3799 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3800 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3801 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3802 ; CHECK-NEXT: callq fmin@PLT
3803 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
3804 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
3805 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
3806 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3807 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3808 ; CHECK-NEXT: callq fmin@PLT
3809 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3810 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3811 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
3812 ; CHECK-NEXT: callq fmin@PLT
3813 ; CHECK-NEXT: movaps %xmm0, %xmm1
3814 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
3815 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
3816 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
3817 ; CHECK-NEXT: addq $40, %rsp
3818 ; CHECK-NEXT: .cfi_def_cfa_offset 8
3821 ; AVX-LABEL: constrained_vector_minnum_v4f64:
3822 ; AVX: # %bb.0: # %entry
3823 ; AVX-NEXT: subq $40, %rsp
3824 ; AVX-NEXT: .cfi_def_cfa_offset 48
3825 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3826 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3827 ; AVX-NEXT: callq fmin@PLT
3828 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3829 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3830 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3831 ; AVX-NEXT: callq fmin@PLT
3832 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
3833 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3834 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
3835 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3836 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3837 ; AVX-NEXT: callq fmin@PLT
3838 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
3839 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3840 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
3841 ; AVX-NEXT: callq fmin@PLT
3842 ; AVX-NEXT: vunpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
3843 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
3844 ; AVX-NEXT: vinsertf128 $1, (%rsp), %ymm0, %ymm0 # 16-byte Folded Reload
3845 ; AVX-NEXT: addq $40, %rsp
3846 ; AVX-NEXT: .cfi_def_cfa_offset 8
3849 %min = call <4 x double> @llvm.experimental.constrained.minnum.v4f64(
3850 <4 x double> <double 44.0, double 45.0,
3851 double 46.0, double 47.0>,
3852 <4 x double> <double 40.0, double 41.0,
3853 double 42.0, double 43.0>,
3854 metadata !"fpexcept.strict") #0
3855 ret <4 x double> %min
3858 define <1 x i32> @constrained_vector_fptosi_v1i32_v1f32() #0 {
3859 ; CHECK-LABEL: constrained_vector_fptosi_v1i32_v1f32:
3860 ; CHECK: # %bb.0: # %entry
3861 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3864 ; AVX-LABEL: constrained_vector_fptosi_v1i32_v1f32:
3865 ; AVX: # %bb.0: # %entry
3866 ; AVX-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3869 %result = call <1 x i32> @llvm.experimental.constrained.fptosi.v1i32.v1f32(
3870 <1 x float><float 42.0>,
3871 metadata !"fpexcept.strict") #0
3872 ret <1 x i32> %result
3875 define <2 x i32> @constrained_vector_fptosi_v2i32_v2f32() #0 {
3876 ; CHECK-LABEL: constrained_vector_fptosi_v2i32_v2f32:
3877 ; CHECK: # %bb.0: # %entry
3878 ; CHECK-NEXT: cvttps2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3881 ; AVX-LABEL: constrained_vector_fptosi_v2i32_v2f32:
3882 ; AVX: # %bb.0: # %entry
3883 ; AVX-NEXT: vcvttps2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3886 %result = call <2 x i32> @llvm.experimental.constrained.fptosi.v2i32.v2f32(
3887 <2 x float><float 42.0, float 43.0>,
3888 metadata !"fpexcept.strict") #0
3889 ret <2 x i32> %result
3892 define <3 x i32> @constrained_vector_fptosi_v3i32_v3f32() #0 {
3893 ; CHECK-LABEL: constrained_vector_fptosi_v3i32_v3f32:
3894 ; CHECK: # %bb.0: # %entry
3895 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3896 ; CHECK-NEXT: movd %eax, %xmm1
3897 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3898 ; CHECK-NEXT: movd %eax, %xmm0
3899 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
3900 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3901 ; CHECK-NEXT: movd %eax, %xmm1
3902 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3905 ; AVX-LABEL: constrained_vector_fptosi_v3i32_v3f32:
3906 ; AVX: # %bb.0: # %entry
3907 ; AVX-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3908 ; AVX-NEXT: vmovd %eax, %xmm0
3909 ; AVX-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3910 ; AVX-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
3911 ; AVX-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
3912 ; AVX-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
3915 %result = call <3 x i32> @llvm.experimental.constrained.fptosi.v3i32.v3f32(
3916 <3 x float><float 42.0, float 43.0,
3918 metadata !"fpexcept.strict") #0
3919 ret <3 x i32> %result
3922 define <4 x i32> @constrained_vector_fptosi_v4i32_v4f32() #0 {
3923 ; CHECK-LABEL: constrained_vector_fptosi_v4i32_v4f32:
3924 ; CHECK: # %bb.0: # %entry
3925 ; CHECK-NEXT: cvttps2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3928 ; AVX-LABEL: constrained_vector_fptosi_v4i32_v4f32:
3929 ; AVX: # %bb.0: # %entry
3930 ; AVX-NEXT: vcvttps2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3933 %result = call <4 x i32> @llvm.experimental.constrained.fptosi.v4i32.v4f32(
3934 <4 x float><float 42.0, float 43.0,
3935 float 44.0, float 45.0>,
3936 metadata !"fpexcept.strict") #0
3937 ret <4 x i32> %result
3940 define <1 x i64> @constrained_vector_fptosi_v1i64_v1f32() #0 {
3941 ; CHECK-LABEL: constrained_vector_fptosi_v1i64_v1f32:
3942 ; CHECK: # %bb.0: # %entry
3943 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3946 ; AVX-LABEL: constrained_vector_fptosi_v1i64_v1f32:
3947 ; AVX: # %bb.0: # %entry
3948 ; AVX-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3951 %result = call <1 x i64> @llvm.experimental.constrained.fptosi.v1i64.v1f32(
3952 <1 x float><float 42.0>,
3953 metadata !"fpexcept.strict") #0
3954 ret <1 x i64> %result
3957 define <2 x i64> @constrained_vector_fptosi_v2i64_v2f32() #0 {
3958 ; CHECK-LABEL: constrained_vector_fptosi_v2i64_v2f32:
3959 ; CHECK: # %bb.0: # %entry
3960 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3961 ; CHECK-NEXT: movq %rax, %xmm1
3962 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3963 ; CHECK-NEXT: movq %rax, %xmm0
3964 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3967 ; AVX1-LABEL: constrained_vector_fptosi_v2i64_v2f32:
3968 ; AVX1: # %bb.0: # %entry
3969 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3970 ; AVX1-NEXT: vmovq %rax, %xmm0
3971 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3972 ; AVX1-NEXT: vmovq %rax, %xmm1
3973 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
3976 ; AVX512F-LABEL: constrained_vector_fptosi_v2i64_v2f32:
3977 ; AVX512F: # %bb.0: # %entry
3978 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3979 ; AVX512F-NEXT: vmovq %rax, %xmm0
3980 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
3981 ; AVX512F-NEXT: vmovq %rax, %xmm1
3982 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
3983 ; AVX512F-NEXT: retq
3985 ; AVX512DQ-LABEL: constrained_vector_fptosi_v2i64_v2f32:
3986 ; AVX512DQ: # %bb.0: # %entry
3987 ; AVX512DQ-NEXT: vcvttps2qq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0
3988 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3989 ; AVX512DQ-NEXT: vzeroupper
3990 ; AVX512DQ-NEXT: retq
3992 %result = call <2 x i64> @llvm.experimental.constrained.fptosi.v2i64.v2f32(
3993 <2 x float><float 42.0, float 43.0>,
3994 metadata !"fpexcept.strict") #0
3995 ret <2 x i64> %result
3998 define <3 x i64> @constrained_vector_fptosi_v3i64_v3f32() #0 {
3999 ; CHECK-LABEL: constrained_vector_fptosi_v3i64_v3f32:
4000 ; CHECK: # %bb.0: # %entry
4001 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4002 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rdx
4003 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4006 ; AVX1-LABEL: constrained_vector_fptosi_v3i64_v3f32:
4007 ; AVX1: # %bb.0: # %entry
4008 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4009 ; AVX1-NEXT: vmovq %rax, %xmm0
4010 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4011 ; AVX1-NEXT: vmovq %rax, %xmm1
4012 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4013 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4014 ; AVX1-NEXT: vmovq %rax, %xmm1
4015 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
4018 ; AVX512-LABEL: constrained_vector_fptosi_v3i64_v3f32:
4019 ; AVX512: # %bb.0: # %entry
4020 ; AVX512-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4021 ; AVX512-NEXT: vmovq %rax, %xmm0
4022 ; AVX512-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4023 ; AVX512-NEXT: vmovq %rax, %xmm1
4024 ; AVX512-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4025 ; AVX512-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4026 ; AVX512-NEXT: vmovq %rax, %xmm1
4027 ; AVX512-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
4030 %result = call <3 x i64> @llvm.experimental.constrained.fptosi.v3i64.v3f32(
4031 <3 x float><float 42.0, float 43.0,
4033 metadata !"fpexcept.strict") #0
4034 ret <3 x i64> %result
4037 define <4 x i64> @constrained_vector_fptosi_v4i64_v4f32() #0 {
4038 ; CHECK-LABEL: constrained_vector_fptosi_v4i64_v4f32:
4039 ; CHECK: # %bb.0: # %entry
4040 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4041 ; CHECK-NEXT: movq %rax, %xmm1
4042 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4043 ; CHECK-NEXT: movq %rax, %xmm0
4044 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4045 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4046 ; CHECK-NEXT: movq %rax, %xmm2
4047 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4048 ; CHECK-NEXT: movq %rax, %xmm1
4049 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
4052 ; AVX1-LABEL: constrained_vector_fptosi_v4i64_v4f32:
4053 ; AVX1: # %bb.0: # %entry
4054 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4055 ; AVX1-NEXT: vmovq %rax, %xmm0
4056 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4057 ; AVX1-NEXT: vmovq %rax, %xmm1
4058 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4059 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4060 ; AVX1-NEXT: vmovq %rax, %xmm1
4061 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4062 ; AVX1-NEXT: vmovq %rax, %xmm2
4063 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
4064 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4067 ; AVX512F-LABEL: constrained_vector_fptosi_v4i64_v4f32:
4068 ; AVX512F: # %bb.0: # %entry
4069 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4070 ; AVX512F-NEXT: vmovq %rax, %xmm0
4071 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4072 ; AVX512F-NEXT: vmovq %rax, %xmm1
4073 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4074 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4075 ; AVX512F-NEXT: vmovq %rax, %xmm1
4076 ; AVX512F-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4077 ; AVX512F-NEXT: vmovq %rax, %xmm2
4078 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
4079 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
4080 ; AVX512F-NEXT: retq
4082 ; AVX512DQ-LABEL: constrained_vector_fptosi_v4i64_v4f32:
4083 ; AVX512DQ: # %bb.0: # %entry
4084 ; AVX512DQ-NEXT: vmovaps {{.*#+}} xmm0 = [4.2E+1,4.3E+1,4.4E+1,4.5E+1]
4085 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
4086 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
4087 ; AVX512DQ-NEXT: retq
4089 %result = call <4 x i64> @llvm.experimental.constrained.fptosi.v4i64.v4f32(
4090 <4 x float><float 42.0, float 43.0,
4091 float 44.0, float 45.0>,
4092 metadata !"fpexcept.strict") #0
4093 ret <4 x i64> %result
4096 define <1 x i32> @constrained_vector_fptosi_v1i32_v1f64() #0 {
4097 ; CHECK-LABEL: constrained_vector_fptosi_v1i32_v1f64:
4098 ; CHECK: # %bb.0: # %entry
4099 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4102 ; AVX-LABEL: constrained_vector_fptosi_v1i32_v1f64:
4103 ; AVX: # %bb.0: # %entry
4104 ; AVX-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4107 %result = call <1 x i32> @llvm.experimental.constrained.fptosi.v1i32.v1f64(
4108 <1 x double><double 42.1>,
4109 metadata !"fpexcept.strict") #0
4110 ret <1 x i32> %result
4114 define <2 x i32> @constrained_vector_fptosi_v2i32_v2f64() #0 {
4115 ; CHECK-LABEL: constrained_vector_fptosi_v2i32_v2f64:
4116 ; CHECK: # %bb.0: # %entry
4117 ; CHECK-NEXT: cvttpd2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4120 ; AVX-LABEL: constrained_vector_fptosi_v2i32_v2f64:
4121 ; AVX: # %bb.0: # %entry
4122 ; AVX-NEXT: vcvttpd2dqx {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4125 %result = call <2 x i32> @llvm.experimental.constrained.fptosi.v2i32.v2f64(
4126 <2 x double><double 42.1, double 42.2>,
4127 metadata !"fpexcept.strict") #0
4128 ret <2 x i32> %result
4131 define <3 x i32> @constrained_vector_fptosi_v3i32_v3f64() #0 {
4132 ; CHECK-LABEL: constrained_vector_fptosi_v3i32_v3f64:
4133 ; CHECK: # %bb.0: # %entry
4134 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4135 ; CHECK-NEXT: movd %eax, %xmm1
4136 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4137 ; CHECK-NEXT: movd %eax, %xmm0
4138 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4139 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4140 ; CHECK-NEXT: movd %eax, %xmm1
4141 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4144 ; AVX-LABEL: constrained_vector_fptosi_v3i32_v3f64:
4145 ; AVX: # %bb.0: # %entry
4146 ; AVX-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4147 ; AVX-NEXT: vmovd %eax, %xmm0
4148 ; AVX-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4149 ; AVX-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4150 ; AVX-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4151 ; AVX-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
4154 %result = call <3 x i32> @llvm.experimental.constrained.fptosi.v3i32.v3f64(
4155 <3 x double><double 42.1, double 42.2,
4157 metadata !"fpexcept.strict") #0
4158 ret <3 x i32> %result
4161 define <4 x i32> @constrained_vector_fptosi_v4i32_v4f64() #0 {
4162 ; CHECK-LABEL: constrained_vector_fptosi_v4i32_v4f64:
4163 ; CHECK: # %bb.0: # %entry
4164 ; CHECK-NEXT: cvttpd2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
4165 ; CHECK-NEXT: cvttpd2dq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4166 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4169 ; AVX-LABEL: constrained_vector_fptosi_v4i32_v4f64:
4170 ; AVX: # %bb.0: # %entry
4171 ; AVX-NEXT: vcvttpd2dqy {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4174 %result = call <4 x i32> @llvm.experimental.constrained.fptosi.v4i32.v4f64(
4175 <4 x double><double 42.1, double 42.2,
4176 double 42.3, double 42.4>,
4177 metadata !"fpexcept.strict") #0
4178 ret <4 x i32> %result
4181 define <1 x i64> @constrained_vector_fptosi_v1i64_v1f64() #0 {
4182 ; CHECK-LABEL: constrained_vector_fptosi_v1i64_v1f64:
4183 ; CHECK: # %bb.0: # %entry
4184 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4187 ; AVX-LABEL: constrained_vector_fptosi_v1i64_v1f64:
4188 ; AVX: # %bb.0: # %entry
4189 ; AVX-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4192 %result = call <1 x i64> @llvm.experimental.constrained.fptosi.v1i64.v1f64(
4193 <1 x double><double 42.1>,
4194 metadata !"fpexcept.strict") #0
4195 ret <1 x i64> %result
4198 define <2 x i64> @constrained_vector_fptosi_v2i64_v2f64() #0 {
4199 ; CHECK-LABEL: constrained_vector_fptosi_v2i64_v2f64:
4200 ; CHECK: # %bb.0: # %entry
4201 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4202 ; CHECK-NEXT: movq %rax, %xmm1
4203 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4204 ; CHECK-NEXT: movq %rax, %xmm0
4205 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4208 ; AVX1-LABEL: constrained_vector_fptosi_v2i64_v2f64:
4209 ; AVX1: # %bb.0: # %entry
4210 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4211 ; AVX1-NEXT: vmovq %rax, %xmm0
4212 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4213 ; AVX1-NEXT: vmovq %rax, %xmm1
4214 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4217 ; AVX512F-LABEL: constrained_vector_fptosi_v2i64_v2f64:
4218 ; AVX512F: # %bb.0: # %entry
4219 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4220 ; AVX512F-NEXT: vmovq %rax, %xmm0
4221 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4222 ; AVX512F-NEXT: vmovq %rax, %xmm1
4223 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4224 ; AVX512F-NEXT: retq
4226 ; AVX512DQ-LABEL: constrained_vector_fptosi_v2i64_v2f64:
4227 ; AVX512DQ: # %bb.0: # %entry
4228 ; AVX512DQ-NEXT: vmovaps {{.*#+}} xmm0 = [4.2100000000000001E+1,4.2200000000000003E+1]
4229 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
4230 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4231 ; AVX512DQ-NEXT: vzeroupper
4232 ; AVX512DQ-NEXT: retq
4234 %result = call <2 x i64> @llvm.experimental.constrained.fptosi.v2i64.v2f64(
4235 <2 x double><double 42.1, double 42.2>,
4236 metadata !"fpexcept.strict") #0
4237 ret <2 x i64> %result
4240 define <3 x i64> @constrained_vector_fptosi_v3i64_v3f64() #0 {
4241 ; CHECK-LABEL: constrained_vector_fptosi_v3i64_v3f64:
4242 ; CHECK: # %bb.0: # %entry
4243 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4244 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rdx
4245 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4248 ; AVX1-LABEL: constrained_vector_fptosi_v3i64_v3f64:
4249 ; AVX1: # %bb.0: # %entry
4250 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4251 ; AVX1-NEXT: vmovq %rax, %xmm0
4252 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4253 ; AVX1-NEXT: vmovq %rax, %xmm1
4254 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4255 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4256 ; AVX1-NEXT: vmovq %rax, %xmm1
4257 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
4260 ; AVX512-LABEL: constrained_vector_fptosi_v3i64_v3f64:
4261 ; AVX512: # %bb.0: # %entry
4262 ; AVX512-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4263 ; AVX512-NEXT: vmovq %rax, %xmm0
4264 ; AVX512-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4265 ; AVX512-NEXT: vmovq %rax, %xmm1
4266 ; AVX512-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4267 ; AVX512-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4268 ; AVX512-NEXT: vmovq %rax, %xmm1
4269 ; AVX512-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
4272 %result = call <3 x i64> @llvm.experimental.constrained.fptosi.v3i64.v3f64(
4273 <3 x double><double 42.1, double 42.2,
4275 metadata !"fpexcept.strict") #0
4276 ret <3 x i64> %result
4279 define <4 x i64> @constrained_vector_fptosi_v4i64_v4f64() #0 {
4280 ; CHECK-LABEL: constrained_vector_fptosi_v4i64_v4f64:
4281 ; CHECK: # %bb.0: # %entry
4282 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4283 ; CHECK-NEXT: movq %rax, %xmm1
4284 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4285 ; CHECK-NEXT: movq %rax, %xmm0
4286 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4287 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4288 ; CHECK-NEXT: movq %rax, %xmm2
4289 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4290 ; CHECK-NEXT: movq %rax, %xmm1
4291 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
4294 ; AVX1-LABEL: constrained_vector_fptosi_v4i64_v4f64:
4295 ; AVX1: # %bb.0: # %entry
4296 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4297 ; AVX1-NEXT: vmovq %rax, %xmm0
4298 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4299 ; AVX1-NEXT: vmovq %rax, %xmm1
4300 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4301 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4302 ; AVX1-NEXT: vmovq %rax, %xmm1
4303 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4304 ; AVX1-NEXT: vmovq %rax, %xmm2
4305 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
4306 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4309 ; AVX512F-LABEL: constrained_vector_fptosi_v4i64_v4f64:
4310 ; AVX512F: # %bb.0: # %entry
4311 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4312 ; AVX512F-NEXT: vmovq %rax, %xmm0
4313 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4314 ; AVX512F-NEXT: vmovq %rax, %xmm1
4315 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4316 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4317 ; AVX512F-NEXT: vmovq %rax, %xmm1
4318 ; AVX512F-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4319 ; AVX512F-NEXT: vmovq %rax, %xmm2
4320 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
4321 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
4322 ; AVX512F-NEXT: retq
4324 ; AVX512DQ-LABEL: constrained_vector_fptosi_v4i64_v4f64:
4325 ; AVX512DQ: # %bb.0: # %entry
4326 ; AVX512DQ-NEXT: vmovaps {{.*#+}} ymm0 = [4.2100000000000001E+1,4.2200000000000003E+1,4.2299999999999997E+1,4.2399999999999999E+1]
4327 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
4328 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
4329 ; AVX512DQ-NEXT: retq
4331 %result = call <4 x i64> @llvm.experimental.constrained.fptosi.v4i64.v4f64(
4332 <4 x double><double 42.1, double 42.2,
4333 double 42.3, double 42.4>,
4334 metadata !"fpexcept.strict") #0
4335 ret <4 x i64> %result
4338 define <1 x i32> @constrained_vector_fptoui_v1i32_v1f32() #0 {
4339 ; CHECK-LABEL: constrained_vector_fptoui_v1i32_v1f32:
4340 ; CHECK: # %bb.0: # %entry
4341 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4342 ; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
4345 ; AVX1-LABEL: constrained_vector_fptoui_v1i32_v1f32:
4346 ; AVX1: # %bb.0: # %entry
4347 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4348 ; AVX1-NEXT: # kill: def $eax killed $eax killed $rax
4351 ; AVX512-LABEL: constrained_vector_fptoui_v1i32_v1f32:
4352 ; AVX512: # %bb.0: # %entry
4353 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4356 %result = call <1 x i32> @llvm.experimental.constrained.fptoui.v1i32.v1f32(
4357 <1 x float><float 42.0>,
4358 metadata !"fpexcept.strict") #0
4359 ret <1 x i32> %result
4362 define <2 x i32> @constrained_vector_fptoui_v2i32_v2f32() #0 {
4363 ; CHECK-LABEL: constrained_vector_fptoui_v2i32_v2f32:
4364 ; CHECK: # %bb.0: # %entry
4365 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4366 ; CHECK-NEXT: movd %eax, %xmm1
4367 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4368 ; CHECK-NEXT: movd %eax, %xmm0
4369 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4372 ; AVX1-LABEL: constrained_vector_fptoui_v2i32_v2f32:
4373 ; AVX1: # %bb.0: # %entry
4374 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4375 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4376 ; AVX1-NEXT: vmovd %ecx, %xmm0
4377 ; AVX1-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4380 ; AVX512-LABEL: constrained_vector_fptoui_v2i32_v2f32:
4381 ; AVX512: # %bb.0: # %entry
4382 ; AVX512-NEXT: vmovaps {{.*#+}} xmm0 = [4.2E+1,4.3E+1,0.0E+0,0.0E+0]
4383 ; AVX512-NEXT: vcvttps2udq %zmm0, %zmm0
4384 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4385 ; AVX512-NEXT: vzeroupper
4388 %result = call <2 x i32> @llvm.experimental.constrained.fptoui.v2i32.v2f32(
4389 <2 x float><float 42.0, float 43.0>,
4390 metadata !"fpexcept.strict") #0
4391 ret <2 x i32> %result
4394 define <3 x i32> @constrained_vector_fptoui_v3i32_v3f32() #0 {
4395 ; CHECK-LABEL: constrained_vector_fptoui_v3i32_v3f32:
4396 ; CHECK: # %bb.0: # %entry
4397 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4398 ; CHECK-NEXT: movd %eax, %xmm1
4399 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4400 ; CHECK-NEXT: movd %eax, %xmm0
4401 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4402 ; CHECK-NEXT: cvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4403 ; CHECK-NEXT: movd %eax, %xmm1
4404 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4407 ; AVX1-LABEL: constrained_vector_fptoui_v3i32_v3f32:
4408 ; AVX1: # %bb.0: # %entry
4409 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4410 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4411 ; AVX1-NEXT: vmovd %ecx, %xmm0
4412 ; AVX1-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4413 ; AVX1-NEXT: vcvttss2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4414 ; AVX1-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
4417 ; AVX512-LABEL: constrained_vector_fptoui_v3i32_v3f32:
4418 ; AVX512: # %bb.0: # %entry
4419 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4420 ; AVX512-NEXT: vmovd %eax, %xmm0
4421 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4422 ; AVX512-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4423 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4424 ; AVX512-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
4427 %result = call <3 x i32> @llvm.experimental.constrained.fptoui.v3i32.v3f32(
4428 <3 x float><float 42.0, float 43.0,
4430 metadata !"fpexcept.strict") #0
4431 ret <3 x i32> %result
4434 define <4 x i32> @constrained_vector_fptoui_v4i32_v4f32() #0 {
4435 ; CHECK-LABEL: constrained_vector_fptoui_v4i32_v4f32:
4436 ; CHECK: # %bb.0: # %entry
4437 ; CHECK-NEXT: movaps {{.*#+}} xmm0 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
4438 ; CHECK-NEXT: movaps {{.*#+}} xmm1 = [4.2E+1,4.3E+1,4.4E+1,4.5E+1]
4439 ; CHECK-NEXT: movaps %xmm1, %xmm2
4440 ; CHECK-NEXT: cmpltps %xmm0, %xmm2
4441 ; CHECK-NEXT: movaps %xmm2, %xmm3
4442 ; CHECK-NEXT: andnps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
4443 ; CHECK-NEXT: andnps %xmm0, %xmm2
4444 ; CHECK-NEXT: subps %xmm2, %xmm1
4445 ; CHECK-NEXT: cvttps2dq %xmm1, %xmm0
4446 ; CHECK-NEXT: xorps %xmm3, %xmm0
4449 ; AVX1-LABEL: constrained_vector_fptoui_v4i32_v4f32:
4450 ; AVX1: # %bb.0: # %entry
4451 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm0 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
4452 ; AVX1-NEXT: vmovaps {{.*#+}} xmm1 = [4.2E+1,4.3E+1,4.4E+1,4.5E+1]
4453 ; AVX1-NEXT: vcmpltps %xmm0, %xmm1, %xmm2
4454 ; AVX1-NEXT: vxorps %xmm3, %xmm3, %xmm3
4455 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm4 = [2147483648,2147483648,2147483648,2147483648]
4456 ; AVX1-NEXT: vblendvps %xmm2, %xmm3, %xmm4, %xmm4
4457 ; AVX1-NEXT: vblendvps %xmm2, %xmm3, %xmm0, %xmm0
4458 ; AVX1-NEXT: vsubps %xmm0, %xmm1, %xmm0
4459 ; AVX1-NEXT: vcvttps2dq %xmm0, %xmm0
4460 ; AVX1-NEXT: vxorps %xmm4, %xmm0, %xmm0
4463 ; AVX512-LABEL: constrained_vector_fptoui_v4i32_v4f32:
4464 ; AVX512: # %bb.0: # %entry
4465 ; AVX512-NEXT: vmovaps {{.*#+}} xmm0 = [4.2E+1,4.3E+1,4.4E+1,4.5E+1]
4466 ; AVX512-NEXT: vcvttps2udq %zmm0, %zmm0
4467 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4468 ; AVX512-NEXT: vzeroupper
4471 %result = call <4 x i32> @llvm.experimental.constrained.fptoui.v4i32.v4f32(
4472 <4 x float><float 42.0, float 43.0,
4473 float 44.0, float 45.0>,
4474 metadata !"fpexcept.strict") #0
4475 ret <4 x i32> %result
4478 define <1 x i64> @constrained_vector_fptoui_v1i64_v1f32() #0 {
4479 ; CHECK-LABEL: constrained_vector_fptoui_v1i64_v1f32:
4480 ; CHECK: # %bb.0: # %entry
4481 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4482 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4483 ; CHECK-NEXT: comiss %xmm0, %xmm2
4484 ; CHECK-NEXT: xorps %xmm1, %xmm1
4485 ; CHECK-NEXT: ja .LBB115_2
4486 ; CHECK-NEXT: # %bb.1: # %entry
4487 ; CHECK-NEXT: movaps %xmm2, %xmm1
4488 ; CHECK-NEXT: .LBB115_2: # %entry
4489 ; CHECK-NEXT: subss %xmm1, %xmm0
4490 ; CHECK-NEXT: cvttss2si %xmm0, %rcx
4491 ; CHECK-NEXT: setbe %al
4492 ; CHECK-NEXT: movzbl %al, %eax
4493 ; CHECK-NEXT: shlq $63, %rax
4494 ; CHECK-NEXT: xorq %rcx, %rax
4497 ; AVX1-LABEL: constrained_vector_fptoui_v1i64_v1f32:
4498 ; AVX1: # %bb.0: # %entry
4499 ; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4500 ; AVX1-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
4501 ; AVX1-NEXT: vcomiss %xmm0, %xmm1
4502 ; AVX1-NEXT: vxorps %xmm2, %xmm2, %xmm2
4503 ; AVX1-NEXT: ja .LBB115_2
4504 ; AVX1-NEXT: # %bb.1: # %entry
4505 ; AVX1-NEXT: vmovaps %xmm1, %xmm2
4506 ; AVX1-NEXT: .LBB115_2: # %entry
4507 ; AVX1-NEXT: vsubss %xmm2, %xmm0, %xmm0
4508 ; AVX1-NEXT: vcvttss2si %xmm0, %rcx
4509 ; AVX1-NEXT: setbe %al
4510 ; AVX1-NEXT: movzbl %al, %eax
4511 ; AVX1-NEXT: shlq $63, %rax
4512 ; AVX1-NEXT: xorq %rcx, %rax
4515 ; AVX512-LABEL: constrained_vector_fptoui_v1i64_v1f32:
4516 ; AVX512: # %bb.0: # %entry
4517 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4520 %result = call <1 x i64> @llvm.experimental.constrained.fptoui.v1i64.v1f32(
4521 <1 x float><float 42.0>,
4522 metadata !"fpexcept.strict") #0
4523 ret <1 x i64> %result
4526 define <2 x i64> @constrained_vector_fptoui_v2i64_v2f32() #0 {
4527 ; CHECK-LABEL: constrained_vector_fptoui_v2i64_v2f32:
4528 ; CHECK: # %bb.0: # %entry
4529 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4530 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
4531 ; CHECK-NEXT: comiss %xmm2, %xmm1
4532 ; CHECK-NEXT: xorps %xmm0, %xmm0
4533 ; CHECK-NEXT: xorps %xmm3, %xmm3
4534 ; CHECK-NEXT: ja .LBB116_2
4535 ; CHECK-NEXT: # %bb.1: # %entry
4536 ; CHECK-NEXT: movaps %xmm1, %xmm3
4537 ; CHECK-NEXT: .LBB116_2: # %entry
4538 ; CHECK-NEXT: subss %xmm3, %xmm2
4539 ; CHECK-NEXT: cvttss2si %xmm2, %rax
4540 ; CHECK-NEXT: setbe %cl
4541 ; CHECK-NEXT: movzbl %cl, %ecx
4542 ; CHECK-NEXT: shlq $63, %rcx
4543 ; CHECK-NEXT: xorq %rax, %rcx
4544 ; CHECK-NEXT: movq %rcx, %xmm2
4545 ; CHECK-NEXT: movss {{.*#+}} xmm3 = mem[0],zero,zero,zero
4546 ; CHECK-NEXT: comiss %xmm3, %xmm1
4547 ; CHECK-NEXT: ja .LBB116_4
4548 ; CHECK-NEXT: # %bb.3: # %entry
4549 ; CHECK-NEXT: movaps %xmm1, %xmm0
4550 ; CHECK-NEXT: .LBB116_4: # %entry
4551 ; CHECK-NEXT: subss %xmm0, %xmm3
4552 ; CHECK-NEXT: cvttss2si %xmm3, %rax
4553 ; CHECK-NEXT: setbe %cl
4554 ; CHECK-NEXT: movzbl %cl, %ecx
4555 ; CHECK-NEXT: shlq $63, %rcx
4556 ; CHECK-NEXT: xorq %rax, %rcx
4557 ; CHECK-NEXT: movq %rcx, %xmm0
4558 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
4561 ; AVX1-LABEL: constrained_vector_fptoui_v2i64_v2f32:
4562 ; AVX1: # %bb.0: # %entry
4563 ; AVX1-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4564 ; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4565 ; AVX1-NEXT: vcomiss %xmm2, %xmm0
4566 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
4567 ; AVX1-NEXT: vxorps %xmm3, %xmm3, %xmm3
4568 ; AVX1-NEXT: ja .LBB116_2
4569 ; AVX1-NEXT: # %bb.1: # %entry
4570 ; AVX1-NEXT: vmovaps %xmm0, %xmm3
4571 ; AVX1-NEXT: .LBB116_2: # %entry
4572 ; AVX1-NEXT: vsubss %xmm3, %xmm2, %xmm2
4573 ; AVX1-NEXT: vcvttss2si %xmm2, %rax
4574 ; AVX1-NEXT: setbe %cl
4575 ; AVX1-NEXT: movzbl %cl, %ecx
4576 ; AVX1-NEXT: shlq $63, %rcx
4577 ; AVX1-NEXT: xorq %rax, %rcx
4578 ; AVX1-NEXT: vmovq %rcx, %xmm2
4579 ; AVX1-NEXT: vmovss {{.*#+}} xmm3 = mem[0],zero,zero,zero
4580 ; AVX1-NEXT: vcomiss %xmm3, %xmm0
4581 ; AVX1-NEXT: ja .LBB116_4
4582 ; AVX1-NEXT: # %bb.3: # %entry
4583 ; AVX1-NEXT: vmovaps %xmm0, %xmm1
4584 ; AVX1-NEXT: .LBB116_4: # %entry
4585 ; AVX1-NEXT: vsubss %xmm1, %xmm3, %xmm0
4586 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
4587 ; AVX1-NEXT: setbe %cl
4588 ; AVX1-NEXT: movzbl %cl, %ecx
4589 ; AVX1-NEXT: shlq $63, %rcx
4590 ; AVX1-NEXT: xorq %rax, %rcx
4591 ; AVX1-NEXT: vmovq %rcx, %xmm0
4592 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
4595 ; AVX512F-LABEL: constrained_vector_fptoui_v2i64_v2f32:
4596 ; AVX512F: # %bb.0: # %entry
4597 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4598 ; AVX512F-NEXT: vmovq %rax, %xmm0
4599 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4600 ; AVX512F-NEXT: vmovq %rax, %xmm1
4601 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4602 ; AVX512F-NEXT: retq
4604 ; AVX512DQ-LABEL: constrained_vector_fptoui_v2i64_v2f32:
4605 ; AVX512DQ: # %bb.0: # %entry
4606 ; AVX512DQ-NEXT: vcvttps2uqq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0
4607 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4608 ; AVX512DQ-NEXT: vzeroupper
4609 ; AVX512DQ-NEXT: retq
4611 %result = call <2 x i64> @llvm.experimental.constrained.fptoui.v2i64.v2f32(
4612 <2 x float><float 42.0, float 43.0>,
4613 metadata !"fpexcept.strict") #0
4614 ret <2 x i64> %result
4617 define <3 x i64> @constrained_vector_fptoui_v3i64_v3f32() #0 {
4618 ; CHECK-LABEL: constrained_vector_fptoui_v3i64_v3f32:
4619 ; CHECK: # %bb.0: # %entry
4620 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4621 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
4622 ; CHECK-NEXT: comiss %xmm2, %xmm1
4623 ; CHECK-NEXT: xorps %xmm0, %xmm0
4624 ; CHECK-NEXT: xorps %xmm3, %xmm3
4625 ; CHECK-NEXT: ja .LBB117_2
4626 ; CHECK-NEXT: # %bb.1: # %entry
4627 ; CHECK-NEXT: movaps %xmm1, %xmm3
4628 ; CHECK-NEXT: .LBB117_2: # %entry
4629 ; CHECK-NEXT: subss %xmm3, %xmm2
4630 ; CHECK-NEXT: cvttss2si %xmm2, %rcx
4631 ; CHECK-NEXT: setbe %al
4632 ; CHECK-NEXT: movzbl %al, %eax
4633 ; CHECK-NEXT: shlq $63, %rax
4634 ; CHECK-NEXT: xorq %rcx, %rax
4635 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4636 ; CHECK-NEXT: comiss %xmm2, %xmm1
4637 ; CHECK-NEXT: xorps %xmm3, %xmm3
4638 ; CHECK-NEXT: ja .LBB117_4
4639 ; CHECK-NEXT: # %bb.3: # %entry
4640 ; CHECK-NEXT: movaps %xmm1, %xmm3
4641 ; CHECK-NEXT: .LBB117_4: # %entry
4642 ; CHECK-NEXT: subss %xmm3, %xmm2
4643 ; CHECK-NEXT: cvttss2si %xmm2, %rcx
4644 ; CHECK-NEXT: setbe %dl
4645 ; CHECK-NEXT: movzbl %dl, %edx
4646 ; CHECK-NEXT: shlq $63, %rdx
4647 ; CHECK-NEXT: xorq %rcx, %rdx
4648 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4649 ; CHECK-NEXT: comiss %xmm2, %xmm1
4650 ; CHECK-NEXT: ja .LBB117_6
4651 ; CHECK-NEXT: # %bb.5: # %entry
4652 ; CHECK-NEXT: movaps %xmm1, %xmm0
4653 ; CHECK-NEXT: .LBB117_6: # %entry
4654 ; CHECK-NEXT: subss %xmm0, %xmm2
4655 ; CHECK-NEXT: cvttss2si %xmm2, %rsi
4656 ; CHECK-NEXT: setbe %cl
4657 ; CHECK-NEXT: movzbl %cl, %ecx
4658 ; CHECK-NEXT: shlq $63, %rcx
4659 ; CHECK-NEXT: xorq %rsi, %rcx
4662 ; AVX1-LABEL: constrained_vector_fptoui_v3i64_v3f32:
4663 ; AVX1: # %bb.0: # %entry
4664 ; AVX1-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4665 ; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4666 ; AVX1-NEXT: vcomiss %xmm2, %xmm0
4667 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
4668 ; AVX1-NEXT: vxorps %xmm3, %xmm3, %xmm3
4669 ; AVX1-NEXT: ja .LBB117_2
4670 ; AVX1-NEXT: # %bb.1: # %entry
4671 ; AVX1-NEXT: vmovaps %xmm0, %xmm3
4672 ; AVX1-NEXT: .LBB117_2: # %entry
4673 ; AVX1-NEXT: vsubss %xmm3, %xmm2, %xmm2
4674 ; AVX1-NEXT: vcvttss2si %xmm2, %rax
4675 ; AVX1-NEXT: setbe %cl
4676 ; AVX1-NEXT: movzbl %cl, %ecx
4677 ; AVX1-NEXT: shlq $63, %rcx
4678 ; AVX1-NEXT: xorq %rax, %rcx
4679 ; AVX1-NEXT: vmovq %rcx, %xmm2
4680 ; AVX1-NEXT: vmovss {{.*#+}} xmm3 = mem[0],zero,zero,zero
4681 ; AVX1-NEXT: vcomiss %xmm3, %xmm0
4682 ; AVX1-NEXT: vxorps %xmm4, %xmm4, %xmm4
4683 ; AVX1-NEXT: ja .LBB117_4
4684 ; AVX1-NEXT: # %bb.3: # %entry
4685 ; AVX1-NEXT: vmovaps %xmm0, %xmm4
4686 ; AVX1-NEXT: .LBB117_4: # %entry
4687 ; AVX1-NEXT: vsubss %xmm4, %xmm3, %xmm3
4688 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
4689 ; AVX1-NEXT: setbe %cl
4690 ; AVX1-NEXT: movzbl %cl, %ecx
4691 ; AVX1-NEXT: shlq $63, %rcx
4692 ; AVX1-NEXT: xorq %rax, %rcx
4693 ; AVX1-NEXT: vmovq %rcx, %xmm3
4694 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
4695 ; AVX1-NEXT: vmovss {{.*#+}} xmm3 = mem[0],zero,zero,zero
4696 ; AVX1-NEXT: vcomiss %xmm3, %xmm0
4697 ; AVX1-NEXT: ja .LBB117_6
4698 ; AVX1-NEXT: # %bb.5: # %entry
4699 ; AVX1-NEXT: vmovaps %xmm0, %xmm1
4700 ; AVX1-NEXT: .LBB117_6: # %entry
4701 ; AVX1-NEXT: vsubss %xmm1, %xmm3, %xmm0
4702 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
4703 ; AVX1-NEXT: setbe %cl
4704 ; AVX1-NEXT: movzbl %cl, %ecx
4705 ; AVX1-NEXT: shlq $63, %rcx
4706 ; AVX1-NEXT: xorq %rax, %rcx
4707 ; AVX1-NEXT: vmovq %rcx, %xmm0
4708 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
4711 ; AVX512-LABEL: constrained_vector_fptoui_v3i64_v3f32:
4712 ; AVX512: # %bb.0: # %entry
4713 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4714 ; AVX512-NEXT: vmovq %rax, %xmm0
4715 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4716 ; AVX512-NEXT: vmovq %rax, %xmm1
4717 ; AVX512-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4718 ; AVX512-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4719 ; AVX512-NEXT: vmovq %rax, %xmm1
4720 ; AVX512-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
4723 %result = call <3 x i64> @llvm.experimental.constrained.fptoui.v3i64.v3f32(
4724 <3 x float><float 42.0, float 43.0,
4726 metadata !"fpexcept.strict") #0
4727 ret <3 x i64> %result
4730 define <4 x i64> @constrained_vector_fptoui_v4i64_v4f32() #0 {
4731 ; CHECK-LABEL: constrained_vector_fptoui_v4i64_v4f32:
4732 ; CHECK: # %bb.0: # %entry
4733 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4734 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4735 ; CHECK-NEXT: comiss %xmm0, %xmm2
4736 ; CHECK-NEXT: xorps %xmm1, %xmm1
4737 ; CHECK-NEXT: xorps %xmm3, %xmm3
4738 ; CHECK-NEXT: ja .LBB118_2
4739 ; CHECK-NEXT: # %bb.1: # %entry
4740 ; CHECK-NEXT: movaps %xmm2, %xmm3
4741 ; CHECK-NEXT: .LBB118_2: # %entry
4742 ; CHECK-NEXT: subss %xmm3, %xmm0
4743 ; CHECK-NEXT: cvttss2si %xmm0, %rcx
4744 ; CHECK-NEXT: setbe %al
4745 ; CHECK-NEXT: movzbl %al, %eax
4746 ; CHECK-NEXT: shlq $63, %rax
4747 ; CHECK-NEXT: xorq %rcx, %rax
4748 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4749 ; CHECK-NEXT: comiss %xmm0, %xmm2
4750 ; CHECK-NEXT: xorps %xmm4, %xmm4
4751 ; CHECK-NEXT: ja .LBB118_4
4752 ; CHECK-NEXT: # %bb.3: # %entry
4753 ; CHECK-NEXT: movaps %xmm2, %xmm4
4754 ; CHECK-NEXT: .LBB118_4: # %entry
4755 ; CHECK-NEXT: movq %rax, %xmm3
4756 ; CHECK-NEXT: subss %xmm4, %xmm0
4757 ; CHECK-NEXT: cvttss2si %xmm0, %rax
4758 ; CHECK-NEXT: setbe %cl
4759 ; CHECK-NEXT: movzbl %cl, %ecx
4760 ; CHECK-NEXT: shlq $63, %rcx
4761 ; CHECK-NEXT: xorq %rax, %rcx
4762 ; CHECK-NEXT: movq %rcx, %xmm0
4763 ; CHECK-NEXT: movss {{.*#+}} xmm4 = mem[0],zero,zero,zero
4764 ; CHECK-NEXT: comiss %xmm4, %xmm2
4765 ; CHECK-NEXT: xorps %xmm5, %xmm5
4766 ; CHECK-NEXT: ja .LBB118_6
4767 ; CHECK-NEXT: # %bb.5: # %entry
4768 ; CHECK-NEXT: movaps %xmm2, %xmm5
4769 ; CHECK-NEXT: .LBB118_6: # %entry
4770 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm3[0]
4771 ; CHECK-NEXT: subss %xmm5, %xmm4
4772 ; CHECK-NEXT: cvttss2si %xmm4, %rax
4773 ; CHECK-NEXT: setbe %cl
4774 ; CHECK-NEXT: movzbl %cl, %ecx
4775 ; CHECK-NEXT: shlq $63, %rcx
4776 ; CHECK-NEXT: xorq %rax, %rcx
4777 ; CHECK-NEXT: movq %rcx, %xmm3
4778 ; CHECK-NEXT: movss {{.*#+}} xmm4 = mem[0],zero,zero,zero
4779 ; CHECK-NEXT: comiss %xmm4, %xmm2
4780 ; CHECK-NEXT: ja .LBB118_8
4781 ; CHECK-NEXT: # %bb.7: # %entry
4782 ; CHECK-NEXT: movaps %xmm2, %xmm1
4783 ; CHECK-NEXT: .LBB118_8: # %entry
4784 ; CHECK-NEXT: subss %xmm1, %xmm4
4785 ; CHECK-NEXT: cvttss2si %xmm4, %rax
4786 ; CHECK-NEXT: setbe %cl
4787 ; CHECK-NEXT: movzbl %cl, %ecx
4788 ; CHECK-NEXT: shlq $63, %rcx
4789 ; CHECK-NEXT: xorq %rax, %rcx
4790 ; CHECK-NEXT: movq %rcx, %xmm1
4791 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
4794 ; AVX1-LABEL: constrained_vector_fptoui_v4i64_v4f32:
4795 ; AVX1: # %bb.0: # %entry
4796 ; AVX1-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
4797 ; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4798 ; AVX1-NEXT: vcomiss %xmm2, %xmm0
4799 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
4800 ; AVX1-NEXT: vxorps %xmm3, %xmm3, %xmm3
4801 ; AVX1-NEXT: ja .LBB118_2
4802 ; AVX1-NEXT: # %bb.1: # %entry
4803 ; AVX1-NEXT: vmovaps %xmm0, %xmm3
4804 ; AVX1-NEXT: .LBB118_2: # %entry
4805 ; AVX1-NEXT: vsubss %xmm3, %xmm2, %xmm2
4806 ; AVX1-NEXT: vcvttss2si %xmm2, %rcx
4807 ; AVX1-NEXT: setbe %al
4808 ; AVX1-NEXT: movzbl %al, %eax
4809 ; AVX1-NEXT: shlq $63, %rax
4810 ; AVX1-NEXT: xorq %rcx, %rax
4811 ; AVX1-NEXT: vmovss {{.*#+}} xmm3 = mem[0],zero,zero,zero
4812 ; AVX1-NEXT: vcomiss %xmm3, %xmm0
4813 ; AVX1-NEXT: vxorps %xmm4, %xmm4, %xmm4
4814 ; AVX1-NEXT: ja .LBB118_4
4815 ; AVX1-NEXT: # %bb.3: # %entry
4816 ; AVX1-NEXT: vmovaps %xmm0, %xmm4
4817 ; AVX1-NEXT: .LBB118_4: # %entry
4818 ; AVX1-NEXT: vmovq %rax, %xmm2
4819 ; AVX1-NEXT: vsubss %xmm4, %xmm3, %xmm3
4820 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
4821 ; AVX1-NEXT: setbe %cl
4822 ; AVX1-NEXT: movzbl %cl, %ecx
4823 ; AVX1-NEXT: shlq $63, %rcx
4824 ; AVX1-NEXT: xorq %rax, %rcx
4825 ; AVX1-NEXT: vmovq %rcx, %xmm3
4826 ; AVX1-NEXT: vmovss {{.*#+}} xmm4 = mem[0],zero,zero,zero
4827 ; AVX1-NEXT: vcomiss %xmm4, %xmm0
4828 ; AVX1-NEXT: vxorps %xmm5, %xmm5, %xmm5
4829 ; AVX1-NEXT: ja .LBB118_6
4830 ; AVX1-NEXT: # %bb.5: # %entry
4831 ; AVX1-NEXT: vmovaps %xmm0, %xmm5
4832 ; AVX1-NEXT: .LBB118_6: # %entry
4833 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
4834 ; AVX1-NEXT: vsubss %xmm5, %xmm4, %xmm3
4835 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
4836 ; AVX1-NEXT: setbe %cl
4837 ; AVX1-NEXT: movzbl %cl, %ecx
4838 ; AVX1-NEXT: shlq $63, %rcx
4839 ; AVX1-NEXT: xorq %rax, %rcx
4840 ; AVX1-NEXT: vmovq %rcx, %xmm3
4841 ; AVX1-NEXT: vmovss {{.*#+}} xmm4 = mem[0],zero,zero,zero
4842 ; AVX1-NEXT: vcomiss %xmm4, %xmm0
4843 ; AVX1-NEXT: ja .LBB118_8
4844 ; AVX1-NEXT: # %bb.7: # %entry
4845 ; AVX1-NEXT: vmovaps %xmm0, %xmm1
4846 ; AVX1-NEXT: .LBB118_8: # %entry
4847 ; AVX1-NEXT: vsubss %xmm1, %xmm4, %xmm0
4848 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
4849 ; AVX1-NEXT: setbe %cl
4850 ; AVX1-NEXT: movzbl %cl, %ecx
4851 ; AVX1-NEXT: shlq $63, %rcx
4852 ; AVX1-NEXT: xorq %rax, %rcx
4853 ; AVX1-NEXT: vmovq %rcx, %xmm0
4854 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm3[0]
4855 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4858 ; AVX512F-LABEL: constrained_vector_fptoui_v4i64_v4f32:
4859 ; AVX512F: # %bb.0: # %entry
4860 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4861 ; AVX512F-NEXT: vmovq %rax, %xmm0
4862 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4863 ; AVX512F-NEXT: vmovq %rax, %xmm1
4864 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
4865 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4866 ; AVX512F-NEXT: vmovq %rax, %xmm1
4867 ; AVX512F-NEXT: vcvttss2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4868 ; AVX512F-NEXT: vmovq %rax, %xmm2
4869 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
4870 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
4871 ; AVX512F-NEXT: retq
4873 ; AVX512DQ-LABEL: constrained_vector_fptoui_v4i64_v4f32:
4874 ; AVX512DQ: # %bb.0: # %entry
4875 ; AVX512DQ-NEXT: vmovaps {{.*#+}} xmm0 = [4.2E+1,4.3E+1,4.4E+1,4.5E+1]
4876 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
4877 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
4878 ; AVX512DQ-NEXT: retq
4880 %result = call <4 x i64> @llvm.experimental.constrained.fptoui.v4i64.v4f32(
4881 <4 x float><float 42.0, float 43.0,
4882 float 44.0, float 45.0>,
4883 metadata !"fpexcept.strict") #0
4884 ret <4 x i64> %result
4887 define <1 x i32> @constrained_vector_fptoui_v1i32_v1f64() #0 {
4888 ; CHECK-LABEL: constrained_vector_fptoui_v1i32_v1f64:
4889 ; CHECK: # %bb.0: # %entry
4890 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4891 ; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
4894 ; AVX1-LABEL: constrained_vector_fptoui_v1i32_v1f64:
4895 ; AVX1: # %bb.0: # %entry
4896 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4897 ; AVX1-NEXT: # kill: def $eax killed $eax killed $rax
4900 ; AVX512-LABEL: constrained_vector_fptoui_v1i32_v1f64:
4901 ; AVX512: # %bb.0: # %entry
4902 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4905 %result = call <1 x i32> @llvm.experimental.constrained.fptoui.v1i32.v1f64(
4906 <1 x double><double 42.1>,
4907 metadata !"fpexcept.strict") #0
4908 ret <1 x i32> %result
4911 define <2 x i32> @constrained_vector_fptoui_v2i32_v2f64() #0 {
4912 ; CHECK-LABEL: constrained_vector_fptoui_v2i32_v2f64:
4913 ; CHECK: # %bb.0: # %entry
4914 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4915 ; CHECK-NEXT: movd %eax, %xmm1
4916 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4917 ; CHECK-NEXT: movd %eax, %xmm0
4918 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4921 ; AVX1-LABEL: constrained_vector_fptoui_v2i32_v2f64:
4922 ; AVX1: # %bb.0: # %entry
4923 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4924 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4925 ; AVX1-NEXT: vmovd %ecx, %xmm0
4926 ; AVX1-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4929 ; AVX512-LABEL: constrained_vector_fptoui_v2i32_v2f64:
4930 ; AVX512: # %bb.0: # %entry
4931 ; AVX512-NEXT: vmovaps {{.*#+}} ymm0 = [4.2100000000000001E+1,4.2200000000000003E+1,0.0E+0,0.0E+0]
4932 ; AVX512-NEXT: vcvttpd2udq %zmm0, %ymm0
4933 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
4934 ; AVX512-NEXT: vzeroupper
4937 %result = call <2 x i32> @llvm.experimental.constrained.fptoui.v2i32.v2f64(
4938 <2 x double><double 42.1, double 42.2>,
4939 metadata !"fpexcept.strict") #0
4940 ret <2 x i32> %result
4943 define <3 x i32> @constrained_vector_fptoui_v3i32_v3f64() #0 {
4944 ; CHECK-LABEL: constrained_vector_fptoui_v3i32_v3f64:
4945 ; CHECK: # %bb.0: # %entry
4946 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4947 ; CHECK-NEXT: movd %eax, %xmm1
4948 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4949 ; CHECK-NEXT: movd %eax, %xmm0
4950 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4951 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4952 ; CHECK-NEXT: movd %eax, %xmm1
4953 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4956 ; AVX1-LABEL: constrained_vector_fptoui_v3i32_v3f64:
4957 ; AVX1: # %bb.0: # %entry
4958 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4959 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rcx
4960 ; AVX1-NEXT: vmovd %ecx, %xmm0
4961 ; AVX1-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4962 ; AVX1-NEXT: vcvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4963 ; AVX1-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
4966 ; AVX512-LABEL: constrained_vector_fptoui_v3i32_v3f64:
4967 ; AVX512: # %bb.0: # %entry
4968 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4969 ; AVX512-NEXT: vmovd %eax, %xmm0
4970 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4971 ; AVX512-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0
4972 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %eax
4973 ; AVX512-NEXT: vpinsrd $2, %eax, %xmm0, %xmm0
4976 %result = call <3 x i32> @llvm.experimental.constrained.fptoui.v3i32.v3f64(
4977 <3 x double><double 42.1, double 42.2,
4979 metadata !"fpexcept.strict") #0
4980 ret <3 x i32> %result
4983 define <4 x i32> @constrained_vector_fptoui_v4i32_v4f64() #0 {
4984 ; CHECK-LABEL: constrained_vector_fptoui_v4i32_v4f64:
4985 ; CHECK: # %bb.0: # %entry
4986 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4987 ; CHECK-NEXT: movd %eax, %xmm0
4988 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4989 ; CHECK-NEXT: movd %eax, %xmm1
4990 ; CHECK-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
4991 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4992 ; CHECK-NEXT: movd %eax, %xmm2
4993 ; CHECK-NEXT: cvttsd2si {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
4994 ; CHECK-NEXT: movd %eax, %xmm0
4995 ; CHECK-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
4996 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4999 ; AVX1-LABEL: constrained_vector_fptoui_v4i32_v4f64:
5000 ; AVX1: # %bb.0: # %entry
5001 ; AVX1-NEXT: vbroadcastsd {{.*#+}} ymm0 = [2.147483648E+9,2.147483648E+9,2.147483648E+9,2.147483648E+9]
5002 ; AVX1-NEXT: vmovapd {{.*#+}} ymm1 = [4.2100000000000001E+1,4.2200000000000003E+1,4.2299999999999997E+1,4.2399999999999999E+1]
5003 ; AVX1-NEXT: vcmpltpd %ymm0, %ymm1, %ymm2
5004 ; AVX1-NEXT: vextractf128 $1, %ymm2, %xmm3
5005 ; AVX1-NEXT: vshufps {{.*#+}} xmm3 = xmm2[0,2],xmm3[0,2]
5006 ; AVX1-NEXT: vxorps %xmm4, %xmm4, %xmm4
5007 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm5 = [2147483648,2147483648,2147483648,2147483648]
5008 ; AVX1-NEXT: vblendvps %xmm3, %xmm4, %xmm5, %xmm3
5009 ; AVX1-NEXT: vxorps %xmm4, %xmm4, %xmm4
5010 ; AVX1-NEXT: vblendvpd %ymm2, %ymm4, %ymm0, %ymm0
5011 ; AVX1-NEXT: vsubpd %ymm0, %ymm1, %ymm0
5012 ; AVX1-NEXT: vcvttpd2dq %ymm0, %xmm0
5013 ; AVX1-NEXT: vxorpd %xmm3, %xmm0, %xmm0
5014 ; AVX1-NEXT: vzeroupper
5017 ; AVX512-LABEL: constrained_vector_fptoui_v4i32_v4f64:
5018 ; AVX512: # %bb.0: # %entry
5019 ; AVX512-NEXT: vmovaps {{.*#+}} ymm0 = [4.2100000000000001E+1,4.2200000000000003E+1,4.2299999999999997E+1,4.2399999999999999E+1]
5020 ; AVX512-NEXT: vcvttpd2udq %zmm0, %ymm0
5021 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
5022 ; AVX512-NEXT: vzeroupper
5025 %result = call <4 x i32> @llvm.experimental.constrained.fptoui.v4i32.v4f64(
5026 <4 x double><double 42.1, double 42.2,
5027 double 42.3, double 42.4>,
5028 metadata !"fpexcept.strict") #0
5029 ret <4 x i32> %result
5032 define <1 x i64> @constrained_vector_fptoui_v1i64_v1f64() #0 {
5033 ; CHECK-LABEL: constrained_vector_fptoui_v1i64_v1f64:
5034 ; CHECK: # %bb.0: # %entry
5035 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5036 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5037 ; CHECK-NEXT: comisd %xmm0, %xmm2
5038 ; CHECK-NEXT: xorpd %xmm1, %xmm1
5039 ; CHECK-NEXT: ja .LBB123_2
5040 ; CHECK-NEXT: # %bb.1: # %entry
5041 ; CHECK-NEXT: movapd %xmm2, %xmm1
5042 ; CHECK-NEXT: .LBB123_2: # %entry
5043 ; CHECK-NEXT: subsd %xmm1, %xmm0
5044 ; CHECK-NEXT: cvttsd2si %xmm0, %rcx
5045 ; CHECK-NEXT: setbe %al
5046 ; CHECK-NEXT: movzbl %al, %eax
5047 ; CHECK-NEXT: shlq $63, %rax
5048 ; CHECK-NEXT: xorq %rcx, %rax
5051 ; AVX1-LABEL: constrained_vector_fptoui_v1i64_v1f64:
5052 ; AVX1: # %bb.0: # %entry
5053 ; AVX1-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5054 ; AVX1-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
5055 ; AVX1-NEXT: vcomisd %xmm0, %xmm1
5056 ; AVX1-NEXT: vxorpd %xmm2, %xmm2, %xmm2
5057 ; AVX1-NEXT: ja .LBB123_2
5058 ; AVX1-NEXT: # %bb.1: # %entry
5059 ; AVX1-NEXT: vmovapd %xmm1, %xmm2
5060 ; AVX1-NEXT: .LBB123_2: # %entry
5061 ; AVX1-NEXT: vsubsd %xmm2, %xmm0, %xmm0
5062 ; AVX1-NEXT: vcvttsd2si %xmm0, %rcx
5063 ; AVX1-NEXT: setbe %al
5064 ; AVX1-NEXT: movzbl %al, %eax
5065 ; AVX1-NEXT: shlq $63, %rax
5066 ; AVX1-NEXT: xorq %rcx, %rax
5069 ; AVX512-LABEL: constrained_vector_fptoui_v1i64_v1f64:
5070 ; AVX512: # %bb.0: # %entry
5071 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5074 %result = call <1 x i64> @llvm.experimental.constrained.fptoui.v1i64.v1f64(
5075 <1 x double><double 42.1>,
5076 metadata !"fpexcept.strict") #0
5077 ret <1 x i64> %result
5080 define <2 x i64> @constrained_vector_fptoui_v2i64_v2f64() #0 {
5081 ; CHECK-LABEL: constrained_vector_fptoui_v2i64_v2f64:
5082 ; CHECK: # %bb.0: # %entry
5083 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5084 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
5085 ; CHECK-NEXT: comisd %xmm2, %xmm1
5086 ; CHECK-NEXT: xorpd %xmm0, %xmm0
5087 ; CHECK-NEXT: xorpd %xmm3, %xmm3
5088 ; CHECK-NEXT: ja .LBB124_2
5089 ; CHECK-NEXT: # %bb.1: # %entry
5090 ; CHECK-NEXT: movapd %xmm1, %xmm3
5091 ; CHECK-NEXT: .LBB124_2: # %entry
5092 ; CHECK-NEXT: subsd %xmm3, %xmm2
5093 ; CHECK-NEXT: cvttsd2si %xmm2, %rax
5094 ; CHECK-NEXT: setbe %cl
5095 ; CHECK-NEXT: movzbl %cl, %ecx
5096 ; CHECK-NEXT: shlq $63, %rcx
5097 ; CHECK-NEXT: xorq %rax, %rcx
5098 ; CHECK-NEXT: movq %rcx, %xmm2
5099 ; CHECK-NEXT: movsd {{.*#+}} xmm3 = mem[0],zero
5100 ; CHECK-NEXT: comisd %xmm3, %xmm1
5101 ; CHECK-NEXT: ja .LBB124_4
5102 ; CHECK-NEXT: # %bb.3: # %entry
5103 ; CHECK-NEXT: movapd %xmm1, %xmm0
5104 ; CHECK-NEXT: .LBB124_4: # %entry
5105 ; CHECK-NEXT: subsd %xmm0, %xmm3
5106 ; CHECK-NEXT: cvttsd2si %xmm3, %rax
5107 ; CHECK-NEXT: setbe %cl
5108 ; CHECK-NEXT: movzbl %cl, %ecx
5109 ; CHECK-NEXT: shlq $63, %rcx
5110 ; CHECK-NEXT: xorq %rax, %rcx
5111 ; CHECK-NEXT: movq %rcx, %xmm0
5112 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
5115 ; AVX1-LABEL: constrained_vector_fptoui_v2i64_v2f64:
5116 ; AVX1: # %bb.0: # %entry
5117 ; AVX1-NEXT: vmovsd {{.*#+}} xmm2 = mem[0],zero
5118 ; AVX1-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5119 ; AVX1-NEXT: vcomisd %xmm2, %xmm0
5120 ; AVX1-NEXT: vxorpd %xmm1, %xmm1, %xmm1
5121 ; AVX1-NEXT: vxorpd %xmm3, %xmm3, %xmm3
5122 ; AVX1-NEXT: ja .LBB124_2
5123 ; AVX1-NEXT: # %bb.1: # %entry
5124 ; AVX1-NEXT: vmovapd %xmm0, %xmm3
5125 ; AVX1-NEXT: .LBB124_2: # %entry
5126 ; AVX1-NEXT: vsubsd %xmm3, %xmm2, %xmm2
5127 ; AVX1-NEXT: vcvttsd2si %xmm2, %rax
5128 ; AVX1-NEXT: setbe %cl
5129 ; AVX1-NEXT: movzbl %cl, %ecx
5130 ; AVX1-NEXT: shlq $63, %rcx
5131 ; AVX1-NEXT: xorq %rax, %rcx
5132 ; AVX1-NEXT: vmovq %rcx, %xmm2
5133 ; AVX1-NEXT: vmovsd {{.*#+}} xmm3 = mem[0],zero
5134 ; AVX1-NEXT: vcomisd %xmm3, %xmm0
5135 ; AVX1-NEXT: ja .LBB124_4
5136 ; AVX1-NEXT: # %bb.3: # %entry
5137 ; AVX1-NEXT: vmovapd %xmm0, %xmm1
5138 ; AVX1-NEXT: .LBB124_4: # %entry
5139 ; AVX1-NEXT: vsubsd %xmm1, %xmm3, %xmm0
5140 ; AVX1-NEXT: vcvttsd2si %xmm0, %rax
5141 ; AVX1-NEXT: setbe %cl
5142 ; AVX1-NEXT: movzbl %cl, %ecx
5143 ; AVX1-NEXT: shlq $63, %rcx
5144 ; AVX1-NEXT: xorq %rax, %rcx
5145 ; AVX1-NEXT: vmovq %rcx, %xmm0
5146 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
5149 ; AVX512F-LABEL: constrained_vector_fptoui_v2i64_v2f64:
5150 ; AVX512F: # %bb.0: # %entry
5151 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5152 ; AVX512F-NEXT: vmovq %rax, %xmm0
5153 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5154 ; AVX512F-NEXT: vmovq %rax, %xmm1
5155 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
5156 ; AVX512F-NEXT: retq
5158 ; AVX512DQ-LABEL: constrained_vector_fptoui_v2i64_v2f64:
5159 ; AVX512DQ: # %bb.0: # %entry
5160 ; AVX512DQ-NEXT: vmovaps {{.*#+}} xmm0 = [4.2100000000000001E+1,4.2200000000000003E+1]
5161 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
5162 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5163 ; AVX512DQ-NEXT: vzeroupper
5164 ; AVX512DQ-NEXT: retq
5166 %result = call <2 x i64> @llvm.experimental.constrained.fptoui.v2i64.v2f64(
5167 <2 x double><double 42.1, double 42.2>,
5168 metadata !"fpexcept.strict") #0
5169 ret <2 x i64> %result
5172 define <3 x i64> @constrained_vector_fptoui_v3i64_v3f64() #0 {
5173 ; CHECK-LABEL: constrained_vector_fptoui_v3i64_v3f64:
5174 ; CHECK: # %bb.0: # %entry
5175 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5176 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
5177 ; CHECK-NEXT: comisd %xmm2, %xmm1
5178 ; CHECK-NEXT: xorpd %xmm0, %xmm0
5179 ; CHECK-NEXT: xorpd %xmm3, %xmm3
5180 ; CHECK-NEXT: ja .LBB125_2
5181 ; CHECK-NEXT: # %bb.1: # %entry
5182 ; CHECK-NEXT: movapd %xmm1, %xmm3
5183 ; CHECK-NEXT: .LBB125_2: # %entry
5184 ; CHECK-NEXT: subsd %xmm3, %xmm2
5185 ; CHECK-NEXT: cvttsd2si %xmm2, %rcx
5186 ; CHECK-NEXT: setbe %al
5187 ; CHECK-NEXT: movzbl %al, %eax
5188 ; CHECK-NEXT: shlq $63, %rax
5189 ; CHECK-NEXT: xorq %rcx, %rax
5190 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5191 ; CHECK-NEXT: comisd %xmm2, %xmm1
5192 ; CHECK-NEXT: xorpd %xmm3, %xmm3
5193 ; CHECK-NEXT: ja .LBB125_4
5194 ; CHECK-NEXT: # %bb.3: # %entry
5195 ; CHECK-NEXT: movapd %xmm1, %xmm3
5196 ; CHECK-NEXT: .LBB125_4: # %entry
5197 ; CHECK-NEXT: subsd %xmm3, %xmm2
5198 ; CHECK-NEXT: cvttsd2si %xmm2, %rcx
5199 ; CHECK-NEXT: setbe %dl
5200 ; CHECK-NEXT: movzbl %dl, %edx
5201 ; CHECK-NEXT: shlq $63, %rdx
5202 ; CHECK-NEXT: xorq %rcx, %rdx
5203 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5204 ; CHECK-NEXT: comisd %xmm2, %xmm1
5205 ; CHECK-NEXT: ja .LBB125_6
5206 ; CHECK-NEXT: # %bb.5: # %entry
5207 ; CHECK-NEXT: movapd %xmm1, %xmm0
5208 ; CHECK-NEXT: .LBB125_6: # %entry
5209 ; CHECK-NEXT: subsd %xmm0, %xmm2
5210 ; CHECK-NEXT: cvttsd2si %xmm2, %rsi
5211 ; CHECK-NEXT: setbe %cl
5212 ; CHECK-NEXT: movzbl %cl, %ecx
5213 ; CHECK-NEXT: shlq $63, %rcx
5214 ; CHECK-NEXT: xorq %rsi, %rcx
5217 ; AVX1-LABEL: constrained_vector_fptoui_v3i64_v3f64:
5218 ; AVX1: # %bb.0: # %entry
5219 ; AVX1-NEXT: vmovsd {{.*#+}} xmm2 = mem[0],zero
5220 ; AVX1-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5221 ; AVX1-NEXT: vcomisd %xmm2, %xmm0
5222 ; AVX1-NEXT: vxorpd %xmm1, %xmm1, %xmm1
5223 ; AVX1-NEXT: vxorpd %xmm3, %xmm3, %xmm3
5224 ; AVX1-NEXT: ja .LBB125_2
5225 ; AVX1-NEXT: # %bb.1: # %entry
5226 ; AVX1-NEXT: vmovapd %xmm0, %xmm3
5227 ; AVX1-NEXT: .LBB125_2: # %entry
5228 ; AVX1-NEXT: vsubsd %xmm3, %xmm2, %xmm2
5229 ; AVX1-NEXT: vcvttsd2si %xmm2, %rax
5230 ; AVX1-NEXT: setbe %cl
5231 ; AVX1-NEXT: movzbl %cl, %ecx
5232 ; AVX1-NEXT: shlq $63, %rcx
5233 ; AVX1-NEXT: xorq %rax, %rcx
5234 ; AVX1-NEXT: vmovq %rcx, %xmm2
5235 ; AVX1-NEXT: vmovsd {{.*#+}} xmm3 = mem[0],zero
5236 ; AVX1-NEXT: vcomisd %xmm3, %xmm0
5237 ; AVX1-NEXT: vxorpd %xmm4, %xmm4, %xmm4
5238 ; AVX1-NEXT: ja .LBB125_4
5239 ; AVX1-NEXT: # %bb.3: # %entry
5240 ; AVX1-NEXT: vmovapd %xmm0, %xmm4
5241 ; AVX1-NEXT: .LBB125_4: # %entry
5242 ; AVX1-NEXT: vsubsd %xmm4, %xmm3, %xmm3
5243 ; AVX1-NEXT: vcvttsd2si %xmm3, %rax
5244 ; AVX1-NEXT: setbe %cl
5245 ; AVX1-NEXT: movzbl %cl, %ecx
5246 ; AVX1-NEXT: shlq $63, %rcx
5247 ; AVX1-NEXT: xorq %rax, %rcx
5248 ; AVX1-NEXT: vmovq %rcx, %xmm3
5249 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
5250 ; AVX1-NEXT: vmovsd {{.*#+}} xmm3 = mem[0],zero
5251 ; AVX1-NEXT: vcomisd %xmm3, %xmm0
5252 ; AVX1-NEXT: ja .LBB125_6
5253 ; AVX1-NEXT: # %bb.5: # %entry
5254 ; AVX1-NEXT: vmovapd %xmm0, %xmm1
5255 ; AVX1-NEXT: .LBB125_6: # %entry
5256 ; AVX1-NEXT: vsubsd %xmm1, %xmm3, %xmm0
5257 ; AVX1-NEXT: vcvttsd2si %xmm0, %rax
5258 ; AVX1-NEXT: setbe %cl
5259 ; AVX1-NEXT: movzbl %cl, %ecx
5260 ; AVX1-NEXT: shlq $63, %rcx
5261 ; AVX1-NEXT: xorq %rax, %rcx
5262 ; AVX1-NEXT: vmovq %rcx, %xmm0
5263 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
5266 ; AVX512-LABEL: constrained_vector_fptoui_v3i64_v3f64:
5267 ; AVX512: # %bb.0: # %entry
5268 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5269 ; AVX512-NEXT: vmovq %rax, %xmm0
5270 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5271 ; AVX512-NEXT: vmovq %rax, %xmm1
5272 ; AVX512-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
5273 ; AVX512-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5274 ; AVX512-NEXT: vmovq %rax, %xmm1
5275 ; AVX512-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
5278 %result = call <3 x i64> @llvm.experimental.constrained.fptoui.v3i64.v3f64(
5279 <3 x double><double 42.1, double 42.2,
5281 metadata !"fpexcept.strict") #0
5282 ret <3 x i64> %result
5285 define <4 x i64> @constrained_vector_fptoui_v4i64_v4f64() #0 {
5286 ; CHECK-LABEL: constrained_vector_fptoui_v4i64_v4f64:
5287 ; CHECK: # %bb.0: # %entry
5288 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5289 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
5290 ; CHECK-NEXT: comisd %xmm0, %xmm2
5291 ; CHECK-NEXT: xorpd %xmm1, %xmm1
5292 ; CHECK-NEXT: xorpd %xmm3, %xmm3
5293 ; CHECK-NEXT: ja .LBB126_2
5294 ; CHECK-NEXT: # %bb.1: # %entry
5295 ; CHECK-NEXT: movapd %xmm2, %xmm3
5296 ; CHECK-NEXT: .LBB126_2: # %entry
5297 ; CHECK-NEXT: subsd %xmm3, %xmm0
5298 ; CHECK-NEXT: cvttsd2si %xmm0, %rcx
5299 ; CHECK-NEXT: setbe %al
5300 ; CHECK-NEXT: movzbl %al, %eax
5301 ; CHECK-NEXT: shlq $63, %rax
5302 ; CHECK-NEXT: xorq %rcx, %rax
5303 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5304 ; CHECK-NEXT: comisd %xmm0, %xmm2
5305 ; CHECK-NEXT: xorpd %xmm4, %xmm4
5306 ; CHECK-NEXT: ja .LBB126_4
5307 ; CHECK-NEXT: # %bb.3: # %entry
5308 ; CHECK-NEXT: movapd %xmm2, %xmm4
5309 ; CHECK-NEXT: .LBB126_4: # %entry
5310 ; CHECK-NEXT: movq %rax, %xmm3
5311 ; CHECK-NEXT: subsd %xmm4, %xmm0
5312 ; CHECK-NEXT: cvttsd2si %xmm0, %rax
5313 ; CHECK-NEXT: setbe %cl
5314 ; CHECK-NEXT: movzbl %cl, %ecx
5315 ; CHECK-NEXT: shlq $63, %rcx
5316 ; CHECK-NEXT: xorq %rax, %rcx
5317 ; CHECK-NEXT: movq %rcx, %xmm0
5318 ; CHECK-NEXT: movsd {{.*#+}} xmm4 = mem[0],zero
5319 ; CHECK-NEXT: comisd %xmm4, %xmm2
5320 ; CHECK-NEXT: xorpd %xmm5, %xmm5
5321 ; CHECK-NEXT: ja .LBB126_6
5322 ; CHECK-NEXT: # %bb.5: # %entry
5323 ; CHECK-NEXT: movapd %xmm2, %xmm5
5324 ; CHECK-NEXT: .LBB126_6: # %entry
5325 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm3[0]
5326 ; CHECK-NEXT: subsd %xmm5, %xmm4
5327 ; CHECK-NEXT: cvttsd2si %xmm4, %rax
5328 ; CHECK-NEXT: setbe %cl
5329 ; CHECK-NEXT: movzbl %cl, %ecx
5330 ; CHECK-NEXT: shlq $63, %rcx
5331 ; CHECK-NEXT: xorq %rax, %rcx
5332 ; CHECK-NEXT: movq %rcx, %xmm3
5333 ; CHECK-NEXT: movsd {{.*#+}} xmm4 = mem[0],zero
5334 ; CHECK-NEXT: comisd %xmm4, %xmm2
5335 ; CHECK-NEXT: ja .LBB126_8
5336 ; CHECK-NEXT: # %bb.7: # %entry
5337 ; CHECK-NEXT: movapd %xmm2, %xmm1
5338 ; CHECK-NEXT: .LBB126_8: # %entry
5339 ; CHECK-NEXT: subsd %xmm1, %xmm4
5340 ; CHECK-NEXT: cvttsd2si %xmm4, %rax
5341 ; CHECK-NEXT: setbe %cl
5342 ; CHECK-NEXT: movzbl %cl, %ecx
5343 ; CHECK-NEXT: shlq $63, %rcx
5344 ; CHECK-NEXT: xorq %rax, %rcx
5345 ; CHECK-NEXT: movq %rcx, %xmm1
5346 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
5349 ; AVX1-LABEL: constrained_vector_fptoui_v4i64_v4f64:
5350 ; AVX1: # %bb.0: # %entry
5351 ; AVX1-NEXT: vmovsd {{.*#+}} xmm2 = mem[0],zero
5352 ; AVX1-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5353 ; AVX1-NEXT: vcomisd %xmm2, %xmm0
5354 ; AVX1-NEXT: vxorpd %xmm1, %xmm1, %xmm1
5355 ; AVX1-NEXT: vxorpd %xmm3, %xmm3, %xmm3
5356 ; AVX1-NEXT: ja .LBB126_2
5357 ; AVX1-NEXT: # %bb.1: # %entry
5358 ; AVX1-NEXT: vmovapd %xmm0, %xmm3
5359 ; AVX1-NEXT: .LBB126_2: # %entry
5360 ; AVX1-NEXT: vsubsd %xmm3, %xmm2, %xmm2
5361 ; AVX1-NEXT: vcvttsd2si %xmm2, %rcx
5362 ; AVX1-NEXT: setbe %al
5363 ; AVX1-NEXT: movzbl %al, %eax
5364 ; AVX1-NEXT: shlq $63, %rax
5365 ; AVX1-NEXT: xorq %rcx, %rax
5366 ; AVX1-NEXT: vmovsd {{.*#+}} xmm3 = mem[0],zero
5367 ; AVX1-NEXT: vcomisd %xmm3, %xmm0
5368 ; AVX1-NEXT: vxorpd %xmm4, %xmm4, %xmm4
5369 ; AVX1-NEXT: ja .LBB126_4
5370 ; AVX1-NEXT: # %bb.3: # %entry
5371 ; AVX1-NEXT: vmovapd %xmm0, %xmm4
5372 ; AVX1-NEXT: .LBB126_4: # %entry
5373 ; AVX1-NEXT: vmovq %rax, %xmm2
5374 ; AVX1-NEXT: vsubsd %xmm4, %xmm3, %xmm3
5375 ; AVX1-NEXT: vcvttsd2si %xmm3, %rax
5376 ; AVX1-NEXT: setbe %cl
5377 ; AVX1-NEXT: movzbl %cl, %ecx
5378 ; AVX1-NEXT: shlq $63, %rcx
5379 ; AVX1-NEXT: xorq %rax, %rcx
5380 ; AVX1-NEXT: vmovq %rcx, %xmm3
5381 ; AVX1-NEXT: vmovsd {{.*#+}} xmm4 = mem[0],zero
5382 ; AVX1-NEXT: vcomisd %xmm4, %xmm0
5383 ; AVX1-NEXT: vxorpd %xmm5, %xmm5, %xmm5
5384 ; AVX1-NEXT: ja .LBB126_6
5385 ; AVX1-NEXT: # %bb.5: # %entry
5386 ; AVX1-NEXT: vmovapd %xmm0, %xmm5
5387 ; AVX1-NEXT: .LBB126_6: # %entry
5388 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
5389 ; AVX1-NEXT: vsubsd %xmm5, %xmm4, %xmm3
5390 ; AVX1-NEXT: vcvttsd2si %xmm3, %rax
5391 ; AVX1-NEXT: setbe %cl
5392 ; AVX1-NEXT: movzbl %cl, %ecx
5393 ; AVX1-NEXT: shlq $63, %rcx
5394 ; AVX1-NEXT: xorq %rax, %rcx
5395 ; AVX1-NEXT: vmovq %rcx, %xmm3
5396 ; AVX1-NEXT: vmovsd {{.*#+}} xmm4 = mem[0],zero
5397 ; AVX1-NEXT: vcomisd %xmm4, %xmm0
5398 ; AVX1-NEXT: ja .LBB126_8
5399 ; AVX1-NEXT: # %bb.7: # %entry
5400 ; AVX1-NEXT: vmovapd %xmm0, %xmm1
5401 ; AVX1-NEXT: .LBB126_8: # %entry
5402 ; AVX1-NEXT: vsubsd %xmm1, %xmm4, %xmm0
5403 ; AVX1-NEXT: vcvttsd2si %xmm0, %rax
5404 ; AVX1-NEXT: setbe %cl
5405 ; AVX1-NEXT: movzbl %cl, %ecx
5406 ; AVX1-NEXT: shlq $63, %rcx
5407 ; AVX1-NEXT: xorq %rax, %rcx
5408 ; AVX1-NEXT: vmovq %rcx, %xmm0
5409 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm3[0]
5410 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
5413 ; AVX512F-LABEL: constrained_vector_fptoui_v4i64_v4f64:
5414 ; AVX512F: # %bb.0: # %entry
5415 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5416 ; AVX512F-NEXT: vmovq %rax, %xmm0
5417 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5418 ; AVX512F-NEXT: vmovq %rax, %xmm1
5419 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
5420 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5421 ; AVX512F-NEXT: vmovq %rax, %xmm1
5422 ; AVX512F-NEXT: vcvttsd2usi {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %rax
5423 ; AVX512F-NEXT: vmovq %rax, %xmm2
5424 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
5425 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
5426 ; AVX512F-NEXT: retq
5428 ; AVX512DQ-LABEL: constrained_vector_fptoui_v4i64_v4f64:
5429 ; AVX512DQ: # %bb.0: # %entry
5430 ; AVX512DQ-NEXT: vmovaps {{.*#+}} ymm0 = [4.2100000000000001E+1,4.2200000000000003E+1,4.2299999999999997E+1,4.2399999999999999E+1]
5431 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
5432 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
5433 ; AVX512DQ-NEXT: retq
5435 %result = call <4 x i64> @llvm.experimental.constrained.fptoui.v4i64.v4f64(
5436 <4 x double><double 42.1, double 42.2,
5437 double 42.3, double 42.4>,
5438 metadata !"fpexcept.strict") #0
5439 ret <4 x i64> %result
5443 define <1 x float> @constrained_vector_fptrunc_v1f64() #0 {
5444 ; CHECK-LABEL: constrained_vector_fptrunc_v1f64:
5445 ; CHECK: # %bb.0: # %entry
5446 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5447 ; CHECK-NEXT: cvtsd2ss %xmm0, %xmm0
5450 ; AVX-LABEL: constrained_vector_fptrunc_v1f64:
5451 ; AVX: # %bb.0: # %entry
5452 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5453 ; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0
5456 %result = call <1 x float> @llvm.experimental.constrained.fptrunc.v1f32.v1f64(
5457 <1 x double><double 42.1>,
5458 metadata !"round.dynamic",
5459 metadata !"fpexcept.strict") #0
5460 ret <1 x float> %result
5463 define <2 x float> @constrained_vector_fptrunc_v2f64() #0 {
5464 ; CHECK-LABEL: constrained_vector_fptrunc_v2f64:
5465 ; CHECK: # %bb.0: # %entry
5466 ; CHECK-NEXT: cvtpd2ps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5469 ; AVX-LABEL: constrained_vector_fptrunc_v2f64:
5470 ; AVX: # %bb.0: # %entry
5471 ; AVX-NEXT: vcvtpd2psx {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5474 %result = call <2 x float> @llvm.experimental.constrained.fptrunc.v2f32.v2f64(
5475 <2 x double><double 42.1, double 42.2>,
5476 metadata !"round.dynamic",
5477 metadata !"fpexcept.strict") #0
5478 ret <2 x float> %result
5481 define <3 x float> @constrained_vector_fptrunc_v3f64() #0 {
5482 ; CHECK-LABEL: constrained_vector_fptrunc_v3f64:
5483 ; CHECK: # %bb.0: # %entry
5484 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5485 ; CHECK-NEXT: cvtsd2ss %xmm0, %xmm1
5486 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5487 ; CHECK-NEXT: cvtsd2ss %xmm0, %xmm0
5488 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
5489 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
5490 ; CHECK-NEXT: cvtsd2ss %xmm1, %xmm1
5491 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
5494 ; AVX-LABEL: constrained_vector_fptrunc_v3f64:
5495 ; AVX: # %bb.0: # %entry
5496 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5497 ; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0
5498 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
5499 ; AVX-NEXT: vcvtsd2ss %xmm1, %xmm1, %xmm1
5500 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
5501 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
5502 ; AVX-NEXT: vcvtsd2ss %xmm1, %xmm1, %xmm1
5503 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm1[0],xmm0[3]
5506 %result = call <3 x float> @llvm.experimental.constrained.fptrunc.v3f32.v3f64(
5507 <3 x double><double 42.1, double 42.2,
5509 metadata !"round.dynamic",
5510 metadata !"fpexcept.strict") #0
5511 ret <3 x float> %result
5514 define <4 x float> @constrained_vector_fptrunc_v4f64() #0 {
5515 ; CHECK-LABEL: constrained_vector_fptrunc_v4f64:
5516 ; CHECK: # %bb.0: # %entry
5517 ; CHECK-NEXT: cvtpd2ps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
5518 ; CHECK-NEXT: cvtpd2ps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5519 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
5522 ; AVX-LABEL: constrained_vector_fptrunc_v4f64:
5523 ; AVX: # %bb.0: # %entry
5524 ; AVX-NEXT: vcvtpd2psy {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5527 %result = call <4 x float> @llvm.experimental.constrained.fptrunc.v4f32.v4f64(
5528 <4 x double><double 42.1, double 42.2,
5529 double 42.3, double 42.4>,
5530 metadata !"round.dynamic",
5531 metadata !"fpexcept.strict") #0
5532 ret <4 x float> %result
5535 define <1 x double> @constrained_vector_fpext_v1f32() #0 {
5536 ; CHECK-LABEL: constrained_vector_fpext_v1f32:
5537 ; CHECK: # %bb.0: # %entry
5538 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5539 ; CHECK-NEXT: cvtss2sd %xmm0, %xmm0
5542 ; AVX-LABEL: constrained_vector_fpext_v1f32:
5543 ; AVX: # %bb.0: # %entry
5544 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5545 ; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0
5548 %result = call <1 x double> @llvm.experimental.constrained.fpext.v1f64.v1f32(
5549 <1 x float><float 42.0>,
5550 metadata !"fpexcept.strict") #0
5551 ret <1 x double> %result
5554 define <2 x double> @constrained_vector_fpext_v2f32() #0 {
5555 ; CHECK-LABEL: constrained_vector_fpext_v2f32:
5556 ; CHECK: # %bb.0: # %entry
5557 ; CHECK-NEXT: cvtps2pd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5560 ; AVX-LABEL: constrained_vector_fpext_v2f32:
5561 ; AVX: # %bb.0: # %entry
5562 ; AVX-NEXT: vcvtps2pd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5565 %result = call <2 x double> @llvm.experimental.constrained.fpext.v2f64.v2f32(
5566 <2 x float><float 42.0, float 43.0>,
5567 metadata !"fpexcept.strict") #0
5568 ret <2 x double> %result
5571 define <3 x double> @constrained_vector_fpext_v3f32() #0 {
5572 ; CHECK-LABEL: constrained_vector_fpext_v3f32:
5573 ; CHECK: # %bb.0: # %entry
5574 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5575 ; CHECK-NEXT: cvtss2sd %xmm0, %xmm1
5576 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5577 ; CHECK-NEXT: cvtss2sd %xmm0, %xmm0
5578 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
5579 ; CHECK-NEXT: cvtss2sd %xmm2, %xmm2
5580 ; CHECK-NEXT: movsd %xmm2, -{{[0-9]+}}(%rsp)
5581 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
5585 ; AVX-LABEL: constrained_vector_fpext_v3f32:
5586 ; AVX: # %bb.0: # %entry
5587 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5588 ; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0
5589 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
5590 ; AVX-NEXT: vcvtss2sd %xmm1, %xmm1, %xmm1
5591 ; AVX-NEXT: vmovlhps {{.*#+}} xmm0 = xmm1[0],xmm0[0]
5592 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
5593 ; AVX-NEXT: vcvtss2sd %xmm1, %xmm1, %xmm1
5594 ; AVX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
5597 %result = call <3 x double> @llvm.experimental.constrained.fpext.v3f64.v3f32(
5598 <3 x float><float 42.0, float 43.0,
5600 metadata !"fpexcept.strict") #0
5601 ret <3 x double> %result
5604 define <4 x double> @constrained_vector_fpext_v4f32() #0 {
5605 ; CHECK-LABEL: constrained_vector_fpext_v4f32:
5606 ; CHECK: # %bb.0: # %entry
5607 ; CHECK-NEXT: cvtps2pd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
5608 ; CHECK-NEXT: cvtps2pd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5611 ; AVX-LABEL: constrained_vector_fpext_v4f32:
5612 ; AVX: # %bb.0: # %entry
5613 ; AVX-NEXT: vcvtps2pd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0
5616 %result = call <4 x double> @llvm.experimental.constrained.fpext.v4f64.v4f32(
5617 <4 x float><float 42.0, float 43.0,
5618 float 44.0, float 45.0>,
5619 metadata !"fpexcept.strict") #0
5620 ret <4 x double> %result
5623 define <1 x float> @constrained_vector_ceil_v1f32() #0 {
5624 ; CHECK-LABEL: constrained_vector_ceil_v1f32:
5625 ; CHECK: # %bb.0: # %entry
5626 ; CHECK-NEXT: pushq %rax
5627 ; CHECK-NEXT: .cfi_def_cfa_offset 16
5628 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5629 ; CHECK-NEXT: callq ceilf@PLT
5630 ; CHECK-NEXT: popq %rax
5631 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5634 ; AVX-LABEL: constrained_vector_ceil_v1f32:
5635 ; AVX: # %bb.0: # %entry
5636 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5637 ; AVX-NEXT: vroundss $10, %xmm0, %xmm0, %xmm0
5640 %ceil = call <1 x float> @llvm.experimental.constrained.ceil.v1f32(
5641 <1 x float> <float 1.5>,
5642 metadata !"fpexcept.strict") #0
5643 ret <1 x float> %ceil
5646 define <2 x double> @constrained_vector_ceil_v2f64() #0 {
5647 ; CHECK-LABEL: constrained_vector_ceil_v2f64:
5648 ; CHECK: # %bb.0: # %entry
5649 ; CHECK-NEXT: subq $24, %rsp
5650 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5651 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5652 ; CHECK-NEXT: callq ceil@PLT
5653 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5654 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5655 ; CHECK-NEXT: callq ceil@PLT
5656 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
5657 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
5658 ; CHECK-NEXT: addq $24, %rsp
5659 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5662 ; AVX-LABEL: constrained_vector_ceil_v2f64:
5663 ; AVX: # %bb.0: # %entry
5664 ; AVX-NEXT: vroundpd $10, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5667 %ceil = call <2 x double> @llvm.experimental.constrained.ceil.v2f64(
5668 <2 x double> <double 1.1, double 1.9>,
5669 metadata !"fpexcept.strict") #0
5670 ret <2 x double> %ceil
5673 define <3 x float> @constrained_vector_ceil_v3f32() #0 {
5674 ; CHECK-LABEL: constrained_vector_ceil_v3f32:
5675 ; CHECK: # %bb.0: # %entry
5676 ; CHECK-NEXT: subq $40, %rsp
5677 ; CHECK-NEXT: .cfi_def_cfa_offset 48
5678 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5679 ; CHECK-NEXT: callq ceilf@PLT
5680 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
5681 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5682 ; CHECK-NEXT: callq ceilf@PLT
5683 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5684 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5685 ; CHECK-NEXT: callq ceilf@PLT
5686 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
5687 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
5688 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
5689 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
5690 ; CHECK-NEXT: movaps %xmm1, %xmm0
5691 ; CHECK-NEXT: addq $40, %rsp
5692 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5695 ; AVX-LABEL: constrained_vector_ceil_v3f32:
5696 ; AVX: # %bb.0: # %entry
5697 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5698 ; AVX-NEXT: vroundss $10, %xmm0, %xmm0, %xmm0
5699 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
5700 ; AVX-NEXT: vroundss $10, %xmm1, %xmm1, %xmm1
5701 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
5702 ; AVX-NEXT: vroundss $10, %xmm2, %xmm2, %xmm2
5703 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
5704 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
5707 %ceil = call <3 x float> @llvm.experimental.constrained.ceil.v3f32(
5708 <3 x float> <float 1.5, float 2.5, float 3.5>,
5709 metadata !"fpexcept.strict") #0
5710 ret <3 x float> %ceil
5713 define <3 x double> @constrained_vector_ceil_v3f64() #0 {
5714 ; CHECK-LABEL: constrained_vector_ceil_v3f64:
5715 ; CHECK: # %bb.0: # %entry
5716 ; CHECK-NEXT: subq $24, %rsp
5717 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5718 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5719 ; CHECK-NEXT: callq ceil@PLT
5720 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
5721 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5722 ; CHECK-NEXT: callq ceil@PLT
5723 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
5724 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5725 ; CHECK-NEXT: callq ceil@PLT
5726 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
5727 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
5729 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
5730 ; CHECK-NEXT: # xmm0 = mem[0],zero
5731 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
5732 ; CHECK-NEXT: # xmm1 = mem[0],zero
5733 ; CHECK-NEXT: addq $24, %rsp
5734 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5737 ; AVX-LABEL: constrained_vector_ceil_v3f64:
5738 ; AVX: # %bb.0: # %entry
5739 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5740 ; AVX-NEXT: vroundsd $10, %xmm0, %xmm0, %xmm0
5741 ; AVX-NEXT: vroundpd $10, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
5742 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5745 %ceil = call <3 x double> @llvm.experimental.constrained.ceil.v3f64(
5746 <3 x double> <double 1.1, double 1.9, double 1.5>,
5747 metadata !"fpexcept.strict") #0
5748 ret <3 x double> %ceil
5751 define <1 x float> @constrained_vector_floor_v1f32() #0 {
5752 ; CHECK-LABEL: constrained_vector_floor_v1f32:
5753 ; CHECK: # %bb.0: # %entry
5754 ; CHECK-NEXT: pushq %rax
5755 ; CHECK-NEXT: .cfi_def_cfa_offset 16
5756 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5757 ; CHECK-NEXT: callq floorf@PLT
5758 ; CHECK-NEXT: popq %rax
5759 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5762 ; AVX-LABEL: constrained_vector_floor_v1f32:
5763 ; AVX: # %bb.0: # %entry
5764 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5765 ; AVX-NEXT: vroundss $9, %xmm0, %xmm0, %xmm0
5768 %floor = call <1 x float> @llvm.experimental.constrained.floor.v1f32(
5769 <1 x float> <float 1.5>,
5770 metadata !"fpexcept.strict") #0
5771 ret <1 x float> %floor
5775 define <2 x double> @constrained_vector_floor_v2f64() #0 {
5776 ; CHECK-LABEL: constrained_vector_floor_v2f64:
5777 ; CHECK: # %bb.0: # %entry
5778 ; CHECK-NEXT: subq $24, %rsp
5779 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5780 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5781 ; CHECK-NEXT: callq floor@PLT
5782 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5783 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5784 ; CHECK-NEXT: callq floor@PLT
5785 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
5786 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
5787 ; CHECK-NEXT: addq $24, %rsp
5788 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5791 ; AVX-LABEL: constrained_vector_floor_v2f64:
5792 ; AVX: # %bb.0: # %entry
5793 ; AVX-NEXT: vroundpd $9, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
5796 %floor = call <2 x double> @llvm.experimental.constrained.floor.v2f64(
5797 <2 x double> <double 1.1, double 1.9>,
5798 metadata !"fpexcept.strict") #0
5799 ret <2 x double> %floor
5802 define <3 x float> @constrained_vector_floor_v3f32() #0 {
5803 ; CHECK-LABEL: constrained_vector_floor_v3f32:
5804 ; CHECK: # %bb.0: # %entry
5805 ; CHECK-NEXT: subq $40, %rsp
5806 ; CHECK-NEXT: .cfi_def_cfa_offset 48
5807 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5808 ; CHECK-NEXT: callq floorf@PLT
5809 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
5810 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5811 ; CHECK-NEXT: callq floorf@PLT
5812 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5813 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5814 ; CHECK-NEXT: callq floorf@PLT
5815 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
5816 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
5817 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
5818 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
5819 ; CHECK-NEXT: movaps %xmm1, %xmm0
5820 ; CHECK-NEXT: addq $40, %rsp
5821 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5824 ; AVX-LABEL: constrained_vector_floor_v3f32:
5825 ; AVX: # %bb.0: # %entry
5826 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5827 ; AVX-NEXT: vroundss $9, %xmm0, %xmm0, %xmm0
5828 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
5829 ; AVX-NEXT: vroundss $9, %xmm1, %xmm1, %xmm1
5830 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
5831 ; AVX-NEXT: vroundss $9, %xmm2, %xmm2, %xmm2
5832 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
5833 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
5836 %floor = call <3 x float> @llvm.experimental.constrained.floor.v3f32(
5837 <3 x float> <float 1.5, float 2.5, float 3.5>,
5838 metadata !"fpexcept.strict") #0
5839 ret <3 x float> %floor
5842 define <3 x double> @constrained_vector_floor_v3f64() #0 {
5843 ; CHECK-LABEL: constrained_vector_floor_v3f64:
5844 ; CHECK: # %bb.0: # %entry
5845 ; CHECK-NEXT: subq $24, %rsp
5846 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5847 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5848 ; CHECK-NEXT: callq floor@PLT
5849 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
5850 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5851 ; CHECK-NEXT: callq floor@PLT
5852 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
5853 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5854 ; CHECK-NEXT: callq floor@PLT
5855 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
5856 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
5858 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
5859 ; CHECK-NEXT: # xmm0 = mem[0],zero
5860 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
5861 ; CHECK-NEXT: # xmm1 = mem[0],zero
5862 ; CHECK-NEXT: addq $24, %rsp
5863 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5866 ; AVX-LABEL: constrained_vector_floor_v3f64:
5867 ; AVX: # %bb.0: # %entry
5868 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5869 ; AVX-NEXT: vroundsd $9, %xmm0, %xmm0, %xmm0
5870 ; AVX-NEXT: vroundpd $9, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
5871 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5874 %floor = call <3 x double> @llvm.experimental.constrained.floor.v3f64(
5875 <3 x double> <double 1.1, double 1.9, double 1.5>,
5876 metadata !"fpexcept.strict") #0
5877 ret <3 x double> %floor
5880 define <1 x float> @constrained_vector_round_v1f32() #0 {
5881 ; CHECK-LABEL: constrained_vector_round_v1f32:
5882 ; CHECK: # %bb.0: # %entry
5883 ; CHECK-NEXT: pushq %rax
5884 ; CHECK-NEXT: .cfi_def_cfa_offset 16
5885 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5886 ; CHECK-NEXT: callq roundf@PLT
5887 ; CHECK-NEXT: popq %rax
5888 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5891 ; AVX-LABEL: constrained_vector_round_v1f32:
5892 ; AVX: # %bb.0: # %entry
5893 ; AVX-NEXT: pushq %rax
5894 ; AVX-NEXT: .cfi_def_cfa_offset 16
5895 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5896 ; AVX-NEXT: callq roundf@PLT
5897 ; AVX-NEXT: popq %rax
5898 ; AVX-NEXT: .cfi_def_cfa_offset 8
5901 %round = call <1 x float> @llvm.experimental.constrained.round.v1f32(
5902 <1 x float> <float 1.5>,
5903 metadata !"fpexcept.strict") #0
5904 ret <1 x float> %round
5907 define <2 x double> @constrained_vector_round_v2f64() #0 {
5908 ; CHECK-LABEL: constrained_vector_round_v2f64:
5909 ; CHECK: # %bb.0: # %entry
5910 ; CHECK-NEXT: subq $24, %rsp
5911 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5912 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5913 ; CHECK-NEXT: callq round@PLT
5914 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5915 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5916 ; CHECK-NEXT: callq round@PLT
5917 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
5918 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
5919 ; CHECK-NEXT: addq $24, %rsp
5920 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5923 ; AVX-LABEL: constrained_vector_round_v2f64:
5924 ; AVX: # %bb.0: # %entry
5925 ; AVX-NEXT: subq $24, %rsp
5926 ; AVX-NEXT: .cfi_def_cfa_offset 32
5927 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5928 ; AVX-NEXT: callq round@PLT
5929 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
5930 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
5931 ; AVX-NEXT: callq round@PLT
5932 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
5933 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
5934 ; AVX-NEXT: addq $24, %rsp
5935 ; AVX-NEXT: .cfi_def_cfa_offset 8
5938 %round = call <2 x double> @llvm.experimental.constrained.round.v2f64(
5939 <2 x double> <double 1.1, double 1.9>,
5940 metadata !"fpexcept.strict") #0
5941 ret <2 x double> %round
5944 define <3 x float> @constrained_vector_round_v3f32() #0 {
5945 ; CHECK-LABEL: constrained_vector_round_v3f32:
5946 ; CHECK: # %bb.0: # %entry
5947 ; CHECK-NEXT: subq $40, %rsp
5948 ; CHECK-NEXT: .cfi_def_cfa_offset 48
5949 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5950 ; CHECK-NEXT: callq roundf@PLT
5951 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
5952 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5953 ; CHECK-NEXT: callq roundf@PLT
5954 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
5955 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5956 ; CHECK-NEXT: callq roundf@PLT
5957 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
5958 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
5959 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
5960 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
5961 ; CHECK-NEXT: movaps %xmm1, %xmm0
5962 ; CHECK-NEXT: addq $40, %rsp
5963 ; CHECK-NEXT: .cfi_def_cfa_offset 8
5966 ; AVX-LABEL: constrained_vector_round_v3f32:
5967 ; AVX: # %bb.0: # %entry
5968 ; AVX-NEXT: subq $40, %rsp
5969 ; AVX-NEXT: .cfi_def_cfa_offset 48
5970 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5971 ; AVX-NEXT: callq roundf@PLT
5972 ; AVX-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
5973 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5974 ; AVX-NEXT: callq roundf@PLT
5975 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
5976 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
5977 ; AVX-NEXT: callq roundf@PLT
5978 ; AVX-NEXT: vmovaps (%rsp), %xmm1 # 16-byte Reload
5979 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
5980 ; AVX-NEXT: vinsertps $32, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0, %xmm0 # 16-byte Folded Reload
5981 ; AVX-NEXT: # xmm0 = xmm0[0,1],mem[0],xmm0[3]
5982 ; AVX-NEXT: addq $40, %rsp
5983 ; AVX-NEXT: .cfi_def_cfa_offset 8
5986 %round = call <3 x float> @llvm.experimental.constrained.round.v3f32(
5987 <3 x float> <float 1.5, float 2.5, float 3.5>,
5988 metadata !"fpexcept.strict") #0
5989 ret <3 x float> %round
5993 define <3 x double> @constrained_vector_round_v3f64() #0 {
5994 ; CHECK-LABEL: constrained_vector_round_v3f64:
5995 ; CHECK: # %bb.0: # %entry
5996 ; CHECK-NEXT: subq $24, %rsp
5997 ; CHECK-NEXT: .cfi_def_cfa_offset 32
5998 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
5999 ; CHECK-NEXT: callq round@PLT
6000 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
6001 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6002 ; CHECK-NEXT: callq round@PLT
6003 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
6004 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6005 ; CHECK-NEXT: callq round@PLT
6006 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
6007 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
6009 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
6010 ; CHECK-NEXT: # xmm0 = mem[0],zero
6011 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
6012 ; CHECK-NEXT: # xmm1 = mem[0],zero
6013 ; CHECK-NEXT: addq $24, %rsp
6014 ; CHECK-NEXT: .cfi_def_cfa_offset 8
6017 ; AVX-LABEL: constrained_vector_round_v3f64:
6018 ; AVX: # %bb.0: # %entry
6019 ; AVX-NEXT: subq $40, %rsp
6020 ; AVX-NEXT: .cfi_def_cfa_offset 48
6021 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
6022 ; AVX-NEXT: callq round@PLT
6023 ; AVX-NEXT: vmovaps %xmm0, (%rsp) # 16-byte Spill
6024 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
6025 ; AVX-NEXT: callq round@PLT
6026 ; AVX-NEXT: vunpcklpd (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
6027 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
6028 ; AVX-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill
6029 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
6030 ; AVX-NEXT: vzeroupper
6031 ; AVX-NEXT: callq round@PLT
6032 ; AVX-NEXT: vmovups (%rsp), %ymm1 # 32-byte Reload
6033 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6034 ; AVX-NEXT: addq $40, %rsp
6035 ; AVX-NEXT: .cfi_def_cfa_offset 8
6038 %round = call <3 x double> @llvm.experimental.constrained.round.v3f64(
6039 <3 x double> <double 1.1, double 1.9, double 1.5>,
6040 metadata !"fpexcept.strict") #0
6041 ret <3 x double> %round
6044 define <1 x float> @constrained_vector_trunc_v1f32() #0 {
6045 ; CHECK-LABEL: constrained_vector_trunc_v1f32:
6046 ; CHECK: # %bb.0: # %entry
6047 ; CHECK-NEXT: pushq %rax
6048 ; CHECK-NEXT: .cfi_def_cfa_offset 16
6049 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6050 ; CHECK-NEXT: callq truncf@PLT
6051 ; CHECK-NEXT: popq %rax
6052 ; CHECK-NEXT: .cfi_def_cfa_offset 8
6055 ; AVX-LABEL: constrained_vector_trunc_v1f32:
6056 ; AVX: # %bb.0: # %entry
6057 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6058 ; AVX-NEXT: vroundss $11, %xmm0, %xmm0, %xmm0
6061 %trunc = call <1 x float> @llvm.experimental.constrained.trunc.v1f32(
6062 <1 x float> <float 1.5>,
6063 metadata !"fpexcept.strict") #0
6064 ret <1 x float> %trunc
6067 define <2 x double> @constrained_vector_trunc_v2f64() #0 {
6068 ; CHECK-LABEL: constrained_vector_trunc_v2f64:
6069 ; CHECK: # %bb.0: # %entry
6070 ; CHECK-NEXT: subq $24, %rsp
6071 ; CHECK-NEXT: .cfi_def_cfa_offset 32
6072 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6073 ; CHECK-NEXT: callq trunc@PLT
6074 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
6075 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6076 ; CHECK-NEXT: callq trunc@PLT
6077 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
6078 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
6079 ; CHECK-NEXT: addq $24, %rsp
6080 ; CHECK-NEXT: .cfi_def_cfa_offset 8
6083 ; AVX-LABEL: constrained_vector_trunc_v2f64:
6084 ; AVX: # %bb.0: # %entry
6085 ; AVX-NEXT: vroundpd $11, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
6088 %trunc = call <2 x double> @llvm.experimental.constrained.trunc.v2f64(
6089 <2 x double> <double 1.1, double 1.9>,
6090 metadata !"fpexcept.strict") #0
6091 ret <2 x double> %trunc
6094 define <3 x float> @constrained_vector_trunc_v3f32() #0 {
6095 ; CHECK-LABEL: constrained_vector_trunc_v3f32:
6096 ; CHECK: # %bb.0: # %entry
6097 ; CHECK-NEXT: subq $40, %rsp
6098 ; CHECK-NEXT: .cfi_def_cfa_offset 48
6099 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6100 ; CHECK-NEXT: callq truncf@PLT
6101 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
6102 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6103 ; CHECK-NEXT: callq truncf@PLT
6104 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
6105 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6106 ; CHECK-NEXT: callq truncf@PLT
6107 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
6108 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
6109 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
6110 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
6111 ; CHECK-NEXT: movaps %xmm1, %xmm0
6112 ; CHECK-NEXT: addq $40, %rsp
6113 ; CHECK-NEXT: .cfi_def_cfa_offset 8
6116 ; AVX-LABEL: constrained_vector_trunc_v3f32:
6117 ; AVX: # %bb.0: # %entry
6118 ; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
6119 ; AVX-NEXT: vroundss $11, %xmm0, %xmm0, %xmm0
6120 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
6121 ; AVX-NEXT: vroundss $11, %xmm1, %xmm1, %xmm1
6122 ; AVX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
6123 ; AVX-NEXT: vroundss $11, %xmm2, %xmm2, %xmm2
6124 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[2,3]
6125 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
6128 %trunc = call <3 x float> @llvm.experimental.constrained.trunc.v3f32(
6129 <3 x float> <float 1.5, float 2.5, float 3.5>,
6130 metadata !"fpexcept.strict") #0
6131 ret <3 x float> %trunc
6134 define <3 x double> @constrained_vector_trunc_v3f64() #0 {
6135 ; CHECK-LABEL: constrained_vector_trunc_v3f64:
6136 ; CHECK: # %bb.0: # %entry
6137 ; CHECK-NEXT: subq $24, %rsp
6138 ; CHECK-NEXT: .cfi_def_cfa_offset 32
6139 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6140 ; CHECK-NEXT: callq trunc@PLT
6141 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
6142 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6143 ; CHECK-NEXT: callq trunc@PLT
6144 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
6145 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
6146 ; CHECK-NEXT: callq trunc@PLT
6147 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
6148 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
6150 ; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
6151 ; CHECK-NEXT: # xmm0 = mem[0],zero
6152 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
6153 ; CHECK-NEXT: # xmm1 = mem[0],zero
6154 ; CHECK-NEXT: addq $24, %rsp
6155 ; CHECK-NEXT: .cfi_def_cfa_offset 8
6158 ; AVX-LABEL: constrained_vector_trunc_v3f64:
6159 ; AVX: # %bb.0: # %entry
6160 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
6161 ; AVX-NEXT: vroundsd $11, %xmm0, %xmm0, %xmm0
6162 ; AVX-NEXT: vroundpd $11, {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
6163 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6166 %trunc = call <3 x double> @llvm.experimental.constrained.trunc.v3f64(
6167 <3 x double> <double 1.1, double 1.9, double 1.5>,
6168 metadata !"fpexcept.strict") #0
6169 ret <3 x double> %trunc
6172 define <1 x double> @constrained_vector_sitofp_v1f64_v1i32(<1 x i32> %x) #0 {
6173 ; CHECK-LABEL: constrained_vector_sitofp_v1f64_v1i32:
6174 ; CHECK: # %bb.0: # %entry
6175 ; CHECK-NEXT: cvtsi2sd %edi, %xmm0
6178 ; AVX-LABEL: constrained_vector_sitofp_v1f64_v1i32:
6179 ; AVX: # %bb.0: # %entry
6180 ; AVX-NEXT: vcvtsi2sd %edi, %xmm0, %xmm0
6183 %result = call <1 x double>
6184 @llvm.experimental.constrained.sitofp.v1f64.v1i32(<1 x i32> %x,
6185 metadata !"round.dynamic",
6186 metadata !"fpexcept.strict") #0
6187 ret <1 x double> %result
6190 define <1 x float> @constrained_vector_sitofp_v1f32_v1i32(<1 x i32> %x) #0 {
6191 ; CHECK-LABEL: constrained_vector_sitofp_v1f32_v1i32:
6192 ; CHECK: # %bb.0: # %entry
6193 ; CHECK-NEXT: cvtsi2ss %edi, %xmm0
6196 ; AVX-LABEL: constrained_vector_sitofp_v1f32_v1i32:
6197 ; AVX: # %bb.0: # %entry
6198 ; AVX-NEXT: vcvtsi2ss %edi, %xmm0, %xmm0
6201 %result = call <1 x float>
6202 @llvm.experimental.constrained.sitofp.v1f32.v1i32(<1 x i32> %x,
6203 metadata !"round.dynamic",
6204 metadata !"fpexcept.strict") #0
6205 ret <1 x float> %result
6208 define <1 x double> @constrained_vector_sitofp_v1f64_v1i64(<1 x i64> %x) #0 {
6209 ; CHECK-LABEL: constrained_vector_sitofp_v1f64_v1i64:
6210 ; CHECK: # %bb.0: # %entry
6211 ; CHECK-NEXT: cvtsi2sd %rdi, %xmm0
6214 ; AVX-LABEL: constrained_vector_sitofp_v1f64_v1i64:
6215 ; AVX: # %bb.0: # %entry
6216 ; AVX-NEXT: vcvtsi2sd %rdi, %xmm0, %xmm0
6219 %result = call <1 x double>
6220 @llvm.experimental.constrained.sitofp.v1f64.v1i64(<1 x i64> %x,
6221 metadata !"round.dynamic",
6222 metadata !"fpexcept.strict") #0
6223 ret <1 x double> %result
6226 define <1 x float> @constrained_vector_sitofp_v1f32_v1i64(<1 x i64> %x) #0 {
6227 ; CHECK-LABEL: constrained_vector_sitofp_v1f32_v1i64:
6228 ; CHECK: # %bb.0: # %entry
6229 ; CHECK-NEXT: cvtsi2ss %rdi, %xmm0
6232 ; AVX-LABEL: constrained_vector_sitofp_v1f32_v1i64:
6233 ; AVX: # %bb.0: # %entry
6234 ; AVX-NEXT: vcvtsi2ss %rdi, %xmm0, %xmm0
6237 %result = call <1 x float>
6238 @llvm.experimental.constrained.sitofp.v1f32.v1i64(<1 x i64> %x,
6239 metadata !"round.dynamic",
6240 metadata !"fpexcept.strict") #0
6241 ret <1 x float> %result
6244 define <2 x double> @constrained_vector_sitofp_v2f64_v2i32(<2 x i32> %x) #0 {
6245 ; CHECK-LABEL: constrained_vector_sitofp_v2f64_v2i32:
6246 ; CHECK: # %bb.0: # %entry
6247 ; CHECK-NEXT: cvtdq2pd %xmm0, %xmm0
6250 ; AVX-LABEL: constrained_vector_sitofp_v2f64_v2i32:
6251 ; AVX: # %bb.0: # %entry
6252 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
6255 %result = call <2 x double>
6256 @llvm.experimental.constrained.sitofp.v2f64.v2i32(<2 x i32> %x,
6257 metadata !"round.dynamic",
6258 metadata !"fpexcept.strict") #0
6259 ret <2 x double> %result
6262 define <2 x float> @constrained_vector_sitofp_v2f32_v2i32(<2 x i32> %x) #0 {
6263 ; CHECK-LABEL: constrained_vector_sitofp_v2f32_v2i32:
6264 ; CHECK: # %bb.0: # %entry
6265 ; CHECK-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
6266 ; CHECK-NEXT: cvtdq2ps %xmm0, %xmm0
6269 ; AVX-LABEL: constrained_vector_sitofp_v2f32_v2i32:
6270 ; AVX: # %bb.0: # %entry
6271 ; AVX-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
6272 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
6275 %result = call <2 x float>
6276 @llvm.experimental.constrained.sitofp.v2f32.v2i32(<2 x i32> %x,
6277 metadata !"round.dynamic",
6278 metadata !"fpexcept.strict") #0
6279 ret <2 x float> %result
6282 define <2 x double> @constrained_vector_sitofp_v2f64_v2i64(<2 x i64> %x) #0 {
6283 ; CHECK-LABEL: constrained_vector_sitofp_v2f64_v2i64:
6284 ; CHECK: # %bb.0: # %entry
6285 ; CHECK-NEXT: movq %xmm0, %rax
6286 ; CHECK-NEXT: cvtsi2sd %rax, %xmm1
6287 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6288 ; CHECK-NEXT: movq %xmm0, %rax
6289 ; CHECK-NEXT: xorps %xmm0, %xmm0
6290 ; CHECK-NEXT: cvtsi2sd %rax, %xmm0
6291 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm1 = xmm1[0],xmm0[0]
6292 ; CHECK-NEXT: movapd %xmm1, %xmm0
6295 ; AVX1-LABEL: constrained_vector_sitofp_v2f64_v2i64:
6296 ; AVX1: # %bb.0: # %entry
6297 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6298 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
6299 ; AVX1-NEXT: vmovq %xmm0, %rax
6300 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
6301 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6304 ; AVX512F-LABEL: constrained_vector_sitofp_v2f64_v2i64:
6305 ; AVX512F: # %bb.0: # %entry
6306 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
6307 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
6308 ; AVX512F-NEXT: vmovq %xmm0, %rax
6309 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
6310 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6311 ; AVX512F-NEXT: retq
6313 ; AVX512DQ-LABEL: constrained_vector_sitofp_v2f64_v2i64:
6314 ; AVX512DQ: # %bb.0: # %entry
6315 ; AVX512DQ-NEXT: vmovaps %xmm0, %xmm0
6316 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
6317 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
6318 ; AVX512DQ-NEXT: vzeroupper
6319 ; AVX512DQ-NEXT: retq
6321 %result = call <2 x double>
6322 @llvm.experimental.constrained.sitofp.v2f64.v2i64(<2 x i64> %x,
6323 metadata !"round.dynamic",
6324 metadata !"fpexcept.strict") #0
6325 ret <2 x double> %result
6328 define <2 x float> @constrained_vector_sitofp_v2f32_v2i64(<2 x i64> %x) #0 {
6329 ; CHECK-LABEL: constrained_vector_sitofp_v2f32_v2i64:
6330 ; CHECK: # %bb.0: # %entry
6331 ; CHECK-NEXT: movq %xmm0, %rax
6332 ; CHECK-NEXT: cvtsi2ss %rax, %xmm1
6333 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6334 ; CHECK-NEXT: movq %xmm0, %rax
6335 ; CHECK-NEXT: xorps %xmm0, %xmm0
6336 ; CHECK-NEXT: cvtsi2ss %rax, %xmm0
6337 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
6338 ; CHECK-NEXT: movaps %xmm1, %xmm0
6341 ; AVX-LABEL: constrained_vector_sitofp_v2f32_v2i64:
6342 ; AVX: # %bb.0: # %entry
6343 ; AVX-NEXT: vpextrq $1, %xmm0, %rax
6344 ; AVX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
6345 ; AVX-NEXT: vmovq %xmm0, %rax
6346 ; AVX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
6347 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
6350 %result = call <2 x float>
6351 @llvm.experimental.constrained.sitofp.v2f32.v2i64(<2 x i64> %x,
6352 metadata !"round.dynamic",
6353 metadata !"fpexcept.strict") #0
6354 ret <2 x float> %result
6357 define <3 x double> @constrained_vector_sitofp_v3f64_v3i32(<3 x i32> %x) #0 {
6358 ; CHECK-LABEL: constrained_vector_sitofp_v3f64_v3i32:
6359 ; CHECK: # %bb.0: # %entry
6360 ; CHECK-NEXT: movd %xmm0, %eax
6361 ; CHECK-NEXT: cvtsi2sd %eax, %xmm2
6362 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,1,1]
6363 ; CHECK-NEXT: movd %xmm1, %eax
6364 ; CHECK-NEXT: xorps %xmm1, %xmm1
6365 ; CHECK-NEXT: cvtsi2sd %eax, %xmm1
6366 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6367 ; CHECK-NEXT: movd %xmm0, %eax
6368 ; CHECK-NEXT: xorps %xmm0, %xmm0
6369 ; CHECK-NEXT: cvtsi2sd %eax, %xmm0
6370 ; CHECK-NEXT: movsd %xmm0, -{{[0-9]+}}(%rsp)
6371 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
6373 ; CHECK-NEXT: movapd %xmm2, %xmm0
6376 ; AVX-LABEL: constrained_vector_sitofp_v3f64_v3i32:
6377 ; AVX: # %bb.0: # %entry
6378 ; AVX-NEXT: vextractps $1, %xmm0, %eax
6379 ; AVX-NEXT: vcvtsi2sd %eax, %xmm1, %xmm1
6380 ; AVX-NEXT: vmovd %xmm0, %eax
6381 ; AVX-NEXT: vcvtsi2sd %eax, %xmm2, %xmm2
6382 ; AVX-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
6383 ; AVX-NEXT: vpextrd $2, %xmm0, %eax
6384 ; AVX-NEXT: vcvtsi2sd %eax, %xmm3, %xmm0
6385 ; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6388 %result = call <3 x double>
6389 @llvm.experimental.constrained.sitofp.v3f64.v3i32(<3 x i32> %x,
6390 metadata !"round.dynamic",
6391 metadata !"fpexcept.strict") #0
6392 ret <3 x double> %result
6395 define <3 x float> @constrained_vector_sitofp_v3f32_v3i32(<3 x i32> %x) #0 {
6396 ; CHECK-LABEL: constrained_vector_sitofp_v3f32_v3i32:
6397 ; CHECK: # %bb.0: # %entry
6398 ; CHECK-NEXT: movd %xmm0, %eax
6399 ; CHECK-NEXT: cvtsi2ss %eax, %xmm1
6400 ; CHECK-NEXT: pshufd {{.*#+}} xmm2 = xmm0[1,1,1,1]
6401 ; CHECK-NEXT: movd %xmm2, %eax
6402 ; CHECK-NEXT: xorps %xmm2, %xmm2
6403 ; CHECK-NEXT: cvtsi2ss %eax, %xmm2
6404 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
6405 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6406 ; CHECK-NEXT: movd %xmm0, %eax
6407 ; CHECK-NEXT: xorps %xmm0, %xmm0
6408 ; CHECK-NEXT: cvtsi2ss %eax, %xmm0
6409 ; CHECK-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm0[0]
6410 ; CHECK-NEXT: movaps %xmm1, %xmm0
6413 ; AVX-LABEL: constrained_vector_sitofp_v3f32_v3i32:
6414 ; AVX: # %bb.0: # %entry
6415 ; AVX-NEXT: vextractps $1, %xmm0, %eax
6416 ; AVX-NEXT: vcvtsi2ss %eax, %xmm1, %xmm1
6417 ; AVX-NEXT: vmovd %xmm0, %eax
6418 ; AVX-NEXT: vcvtsi2ss %eax, %xmm2, %xmm2
6419 ; AVX-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
6420 ; AVX-NEXT: vpextrd $2, %xmm0, %eax
6421 ; AVX-NEXT: vcvtsi2ss %eax, %xmm3, %xmm0
6422 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
6425 %result = call <3 x float>
6426 @llvm.experimental.constrained.sitofp.v3f32.v3i32(<3 x i32> %x,
6427 metadata !"round.dynamic",
6428 metadata !"fpexcept.strict") #0
6429 ret <3 x float> %result
6432 define <3 x double> @constrained_vector_sitofp_v3f64_v3i64(<3 x i64> %x) #0 {
6433 ; CHECK-LABEL: constrained_vector_sitofp_v3f64_v3i64:
6434 ; CHECK: # %bb.0: # %entry
6435 ; CHECK-NEXT: cvtsi2sd %rsi, %xmm1
6436 ; CHECK-NEXT: cvtsi2sd %rdi, %xmm0
6437 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm2
6438 ; CHECK-NEXT: movsd %xmm2, -{{[0-9]+}}(%rsp)
6439 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
6443 ; AVX1-LABEL: constrained_vector_sitofp_v3f64_v3i64:
6444 ; AVX1: # %bb.0: # %entry
6445 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6446 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
6447 ; AVX1-NEXT: vmovq %xmm0, %rax
6448 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
6449 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
6450 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6451 ; AVX1-NEXT: vmovq %xmm0, %rax
6452 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
6453 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6456 ; AVX512-LABEL: constrained_vector_sitofp_v3f64_v3i64:
6457 ; AVX512: # %bb.0: # %entry
6458 ; AVX512-NEXT: vpextrq $1, %xmm0, %rax
6459 ; AVX512-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
6460 ; AVX512-NEXT: vmovq %xmm0, %rax
6461 ; AVX512-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
6462 ; AVX512-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
6463 ; AVX512-NEXT: vextracti128 $1, %ymm0, %xmm0
6464 ; AVX512-NEXT: vmovq %xmm0, %rax
6465 ; AVX512-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
6466 ; AVX512-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6469 %result = call <3 x double>
6470 @llvm.experimental.constrained.sitofp.v3f64.v3i64(<3 x i64> %x,
6471 metadata !"round.dynamic",
6472 metadata !"fpexcept.strict") #0
6473 ret <3 x double> %result
6476 define <3 x float> @constrained_vector_sitofp_v3f32_v3i64(<3 x i64> %x) #0 {
6477 ; CHECK-LABEL: constrained_vector_sitofp_v3f32_v3i64:
6478 ; CHECK: # %bb.0: # %entry
6479 ; CHECK-NEXT: cvtsi2ss %rsi, %xmm1
6480 ; CHECK-NEXT: cvtsi2ss %rdi, %xmm0
6481 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
6482 ; CHECK-NEXT: xorps %xmm1, %xmm1
6483 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm1
6484 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6487 ; AVX1-LABEL: constrained_vector_sitofp_v3f32_v3i64:
6488 ; AVX1: # %bb.0: # %entry
6489 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6490 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
6491 ; AVX1-NEXT: vmovq %xmm0, %rax
6492 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
6493 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
6494 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6495 ; AVX1-NEXT: vmovq %xmm0, %rax
6496 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
6497 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
6498 ; AVX1-NEXT: vzeroupper
6501 ; AVX512-LABEL: constrained_vector_sitofp_v3f32_v3i64:
6502 ; AVX512: # %bb.0: # %entry
6503 ; AVX512-NEXT: vpextrq $1, %xmm0, %rax
6504 ; AVX512-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
6505 ; AVX512-NEXT: vmovq %xmm0, %rax
6506 ; AVX512-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
6507 ; AVX512-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
6508 ; AVX512-NEXT: vextracti128 $1, %ymm0, %xmm0
6509 ; AVX512-NEXT: vmovq %xmm0, %rax
6510 ; AVX512-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
6511 ; AVX512-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
6512 ; AVX512-NEXT: vzeroupper
6515 %result = call <3 x float>
6516 @llvm.experimental.constrained.sitofp.v3f32.v3i64(<3 x i64> %x,
6517 metadata !"round.dynamic",
6518 metadata !"fpexcept.strict") #0
6519 ret <3 x float> %result
6522 define <4 x double> @constrained_vector_sitofp_v4f64_v4i32(<4 x i32> %x) #0 {
6523 ; CHECK-LABEL: constrained_vector_sitofp_v4f64_v4i32:
6524 ; CHECK: # %bb.0: # %entry
6525 ; CHECK-NEXT: cvtdq2pd %xmm0, %xmm2
6526 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6527 ; CHECK-NEXT: cvtdq2pd %xmm0, %xmm1
6528 ; CHECK-NEXT: movaps %xmm2, %xmm0
6531 ; AVX-LABEL: constrained_vector_sitofp_v4f64_v4i32:
6532 ; AVX: # %bb.0: # %entry
6533 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
6536 %result = call <4 x double>
6537 @llvm.experimental.constrained.sitofp.v4f64.v4i32(<4 x i32> %x,
6538 metadata !"round.dynamic",
6539 metadata !"fpexcept.strict") #0
6540 ret <4 x double> %result
6543 define <4 x float> @constrained_vector_sitofp_v4f32_v4i32(<4 x i32> %x) #0 {
6544 ; CHECK-LABEL: constrained_vector_sitofp_v4f32_v4i32:
6545 ; CHECK: # %bb.0: # %entry
6546 ; CHECK-NEXT: cvtdq2ps %xmm0, %xmm0
6549 ; AVX-LABEL: constrained_vector_sitofp_v4f32_v4i32:
6550 ; AVX: # %bb.0: # %entry
6551 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
6554 %result = call <4 x float>
6555 @llvm.experimental.constrained.sitofp.v4f32.v4i32(<4 x i32> %x,
6556 metadata !"round.dynamic",
6557 metadata !"fpexcept.strict") #0
6558 ret <4 x float> %result
6561 define <4 x double> @constrained_vector_sitofp_v4f64_v4i64(<4 x i64> %x) #0 {
6562 ; CHECK-LABEL: constrained_vector_sitofp_v4f64_v4i64:
6563 ; CHECK: # %bb.0: # %entry
6564 ; CHECK-NEXT: movq %xmm0, %rax
6565 ; CHECK-NEXT: cvtsi2sd %rax, %xmm2
6566 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6567 ; CHECK-NEXT: movq %xmm0, %rax
6568 ; CHECK-NEXT: xorps %xmm0, %xmm0
6569 ; CHECK-NEXT: cvtsi2sd %rax, %xmm0
6570 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm2 = xmm2[0],xmm0[0]
6571 ; CHECK-NEXT: movq %xmm1, %rax
6572 ; CHECK-NEXT: cvtsi2sd %rax, %xmm3
6573 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,2,3]
6574 ; CHECK-NEXT: movq %xmm0, %rax
6575 ; CHECK-NEXT: xorps %xmm0, %xmm0
6576 ; CHECK-NEXT: cvtsi2sd %rax, %xmm0
6577 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm3 = xmm3[0],xmm0[0]
6578 ; CHECK-NEXT: movapd %xmm2, %xmm0
6579 ; CHECK-NEXT: movapd %xmm3, %xmm1
6582 ; AVX1-LABEL: constrained_vector_sitofp_v4f64_v4i64:
6583 ; AVX1: # %bb.0: # %entry
6584 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
6585 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
6586 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
6587 ; AVX1-NEXT: vmovq %xmm1, %rax
6588 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
6589 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
6590 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6591 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
6592 ; AVX1-NEXT: vmovq %xmm0, %rax
6593 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
6594 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
6595 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
6598 ; AVX512F-LABEL: constrained_vector_sitofp_v4f64_v4i64:
6599 ; AVX512F: # %bb.0: # %entry
6600 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
6601 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
6602 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
6603 ; AVX512F-NEXT: vmovq %xmm1, %rax
6604 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
6605 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
6606 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
6607 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
6608 ; AVX512F-NEXT: vmovq %xmm0, %rax
6609 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
6610 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
6611 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
6612 ; AVX512F-NEXT: retq
6614 ; AVX512DQ-LABEL: constrained_vector_sitofp_v4f64_v4i64:
6615 ; AVX512DQ: # %bb.0: # %entry
6616 ; AVX512DQ-NEXT: vmovaps %ymm0, %ymm0
6617 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
6618 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
6619 ; AVX512DQ-NEXT: retq
6621 %result = call <4 x double>
6622 @llvm.experimental.constrained.sitofp.v4f64.v4i64(<4 x i64> %x,
6623 metadata !"round.dynamic",
6624 metadata !"fpexcept.strict") #0
6625 ret <4 x double> %result
6628 define <4 x float> @constrained_vector_sitofp_v4f32_v4i64(<4 x i64> %x) #0 {
6629 ; CHECK-LABEL: constrained_vector_sitofp_v4f32_v4i64:
6630 ; CHECK: # %bb.0: # %entry
6631 ; CHECK-NEXT: movq %xmm1, %rax
6632 ; CHECK-NEXT: cvtsi2ss %rax, %xmm2
6633 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
6634 ; CHECK-NEXT: movq %xmm1, %rax
6635 ; CHECK-NEXT: xorps %xmm1, %xmm1
6636 ; CHECK-NEXT: cvtsi2ss %rax, %xmm1
6637 ; CHECK-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
6638 ; CHECK-NEXT: movq %xmm0, %rax
6639 ; CHECK-NEXT: xorps %xmm1, %xmm1
6640 ; CHECK-NEXT: cvtsi2ss %rax, %xmm1
6641 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
6642 ; CHECK-NEXT: movq %xmm0, %rax
6643 ; CHECK-NEXT: xorps %xmm0, %xmm0
6644 ; CHECK-NEXT: cvtsi2ss %rax, %xmm0
6645 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
6646 ; CHECK-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
6647 ; CHECK-NEXT: movaps %xmm1, %xmm0
6650 ; AVX1-LABEL: constrained_vector_sitofp_v4f32_v4i64:
6651 ; AVX1: # %bb.0: # %entry
6652 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6653 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
6654 ; AVX1-NEXT: vmovq %xmm0, %rax
6655 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
6656 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
6657 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6658 ; AVX1-NEXT: vmovq %xmm0, %rax
6659 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
6660 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
6661 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6662 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
6663 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
6664 ; AVX1-NEXT: vzeroupper
6667 ; AVX512F-LABEL: constrained_vector_sitofp_v4f32_v4i64:
6668 ; AVX512F: # %bb.0: # %entry
6669 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
6670 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
6671 ; AVX512F-NEXT: vmovq %xmm0, %rax
6672 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
6673 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
6674 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
6675 ; AVX512F-NEXT: vmovq %xmm0, %rax
6676 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
6677 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
6678 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
6679 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
6680 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
6681 ; AVX512F-NEXT: vzeroupper
6682 ; AVX512F-NEXT: retq
6684 ; AVX512DQ-LABEL: constrained_vector_sitofp_v4f32_v4i64:
6685 ; AVX512DQ: # %bb.0: # %entry
6686 ; AVX512DQ-NEXT: vmovaps %ymm0, %ymm0
6687 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
6688 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
6689 ; AVX512DQ-NEXT: vzeroupper
6690 ; AVX512DQ-NEXT: retq
6692 %result = call <4 x float>
6693 @llvm.experimental.constrained.sitofp.v4f32.v4i64(<4 x i64> %x,
6694 metadata !"round.dynamic",
6695 metadata !"fpexcept.strict") #0
6696 ret <4 x float> %result
6699 define <1 x double> @constrained_vector_uitofp_v1f64_v1i32(<1 x i32> %x) #0 {
6700 ; CHECK-LABEL: constrained_vector_uitofp_v1f64_v1i32:
6701 ; CHECK: # %bb.0: # %entry
6702 ; CHECK-NEXT: movl %edi, %eax
6703 ; CHECK-NEXT: cvtsi2sd %rax, %xmm0
6706 ; AVX1-LABEL: constrained_vector_uitofp_v1f64_v1i32:
6707 ; AVX1: # %bb.0: # %entry
6708 ; AVX1-NEXT: movl %edi, %eax
6709 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm0, %xmm0
6712 ; AVX512-LABEL: constrained_vector_uitofp_v1f64_v1i32:
6713 ; AVX512: # %bb.0: # %entry
6714 ; AVX512-NEXT: vcvtusi2sd %edi, %xmm0, %xmm0
6717 %result = call <1 x double>
6718 @llvm.experimental.constrained.uitofp.v1f64.v1i32(<1 x i32> %x,
6719 metadata !"round.dynamic",
6720 metadata !"fpexcept.strict") #0
6721 ret <1 x double> %result
6724 define <1 x float> @constrained_vector_uitofp_v1f32_v1i32(<1 x i32> %x) #0 {
6725 ; CHECK-LABEL: constrained_vector_uitofp_v1f32_v1i32:
6726 ; CHECK: # %bb.0: # %entry
6727 ; CHECK-NEXT: movl %edi, %eax
6728 ; CHECK-NEXT: cvtsi2ss %rax, %xmm0
6731 ; AVX1-LABEL: constrained_vector_uitofp_v1f32_v1i32:
6732 ; AVX1: # %bb.0: # %entry
6733 ; AVX1-NEXT: movl %edi, %eax
6734 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm0, %xmm0
6737 ; AVX512-LABEL: constrained_vector_uitofp_v1f32_v1i32:
6738 ; AVX512: # %bb.0: # %entry
6739 ; AVX512-NEXT: vcvtusi2ss %edi, %xmm0, %xmm0
6742 %result = call <1 x float>
6743 @llvm.experimental.constrained.uitofp.v1f32.v1i32(<1 x i32> %x,
6744 metadata !"round.dynamic",
6745 metadata !"fpexcept.strict") #0
6746 ret <1 x float> %result
6749 define <1 x double> @constrained_vector_uitofp_v1f64_v1i64(<1 x i64> %x) #0 {
6750 ; CHECK-LABEL: constrained_vector_uitofp_v1f64_v1i64:
6751 ; CHECK: # %bb.0: # %entry
6752 ; CHECK-NEXT: movq %rdi, %rax
6753 ; CHECK-NEXT: shrq %rax
6754 ; CHECK-NEXT: movl %edi, %ecx
6755 ; CHECK-NEXT: andl $1, %ecx
6756 ; CHECK-NEXT: orq %rax, %rcx
6757 ; CHECK-NEXT: testq %rdi, %rdi
6758 ; CHECK-NEXT: cmovnsq %rdi, %rcx
6759 ; CHECK-NEXT: cvtsi2sd %rcx, %xmm0
6760 ; CHECK-NEXT: jns .LBB169_2
6761 ; CHECK-NEXT: # %bb.1:
6762 ; CHECK-NEXT: addsd %xmm0, %xmm0
6763 ; CHECK-NEXT: .LBB169_2: # %entry
6766 ; AVX1-LABEL: constrained_vector_uitofp_v1f64_v1i64:
6767 ; AVX1: # %bb.0: # %entry
6768 ; AVX1-NEXT: movq %rdi, %rax
6769 ; AVX1-NEXT: shrq %rax
6770 ; AVX1-NEXT: movl %edi, %ecx
6771 ; AVX1-NEXT: andl $1, %ecx
6772 ; AVX1-NEXT: orq %rax, %rcx
6773 ; AVX1-NEXT: testq %rdi, %rdi
6774 ; AVX1-NEXT: cmovnsq %rdi, %rcx
6775 ; AVX1-NEXT: vcvtsi2sd %rcx, %xmm0, %xmm0
6776 ; AVX1-NEXT: jns .LBB169_2
6777 ; AVX1-NEXT: # %bb.1:
6778 ; AVX1-NEXT: vaddsd %xmm0, %xmm0, %xmm0
6779 ; AVX1-NEXT: .LBB169_2: # %entry
6782 ; AVX512-LABEL: constrained_vector_uitofp_v1f64_v1i64:
6783 ; AVX512: # %bb.0: # %entry
6784 ; AVX512-NEXT: vcvtusi2sd %rdi, %xmm0, %xmm0
6787 %result = call <1 x double>
6788 @llvm.experimental.constrained.uitofp.v1f64.v1i64(<1 x i64> %x,
6789 metadata !"round.dynamic",
6790 metadata !"fpexcept.strict") #0
6791 ret <1 x double> %result
6794 define <1 x float> @constrained_vector_uitofp_v1f32_v1i64(<1 x i64> %x) #0 {
6795 ; CHECK-LABEL: constrained_vector_uitofp_v1f32_v1i64:
6796 ; CHECK: # %bb.0: # %entry
6797 ; CHECK-NEXT: movq %rdi, %rax
6798 ; CHECK-NEXT: shrq %rax
6799 ; CHECK-NEXT: movl %edi, %ecx
6800 ; CHECK-NEXT: andl $1, %ecx
6801 ; CHECK-NEXT: orq %rax, %rcx
6802 ; CHECK-NEXT: testq %rdi, %rdi
6803 ; CHECK-NEXT: cmovnsq %rdi, %rcx
6804 ; CHECK-NEXT: cvtsi2ss %rcx, %xmm0
6805 ; CHECK-NEXT: jns .LBB170_2
6806 ; CHECK-NEXT: # %bb.1:
6807 ; CHECK-NEXT: addss %xmm0, %xmm0
6808 ; CHECK-NEXT: .LBB170_2: # %entry
6811 ; AVX1-LABEL: constrained_vector_uitofp_v1f32_v1i64:
6812 ; AVX1: # %bb.0: # %entry
6813 ; AVX1-NEXT: movq %rdi, %rax
6814 ; AVX1-NEXT: shrq %rax
6815 ; AVX1-NEXT: movl %edi, %ecx
6816 ; AVX1-NEXT: andl $1, %ecx
6817 ; AVX1-NEXT: orq %rax, %rcx
6818 ; AVX1-NEXT: testq %rdi, %rdi
6819 ; AVX1-NEXT: cmovnsq %rdi, %rcx
6820 ; AVX1-NEXT: vcvtsi2ss %rcx, %xmm0, %xmm0
6821 ; AVX1-NEXT: jns .LBB170_2
6822 ; AVX1-NEXT: # %bb.1:
6823 ; AVX1-NEXT: vaddss %xmm0, %xmm0, %xmm0
6824 ; AVX1-NEXT: .LBB170_2: # %entry
6827 ; AVX512-LABEL: constrained_vector_uitofp_v1f32_v1i64:
6828 ; AVX512: # %bb.0: # %entry
6829 ; AVX512-NEXT: vcvtusi2ss %rdi, %xmm0, %xmm0
6832 %result = call <1 x float>
6833 @llvm.experimental.constrained.uitofp.v1f32.v1i64(<1 x i64> %x,
6834 metadata !"round.dynamic",
6835 metadata !"fpexcept.strict") #0
6836 ret <1 x float> %result
6839 define <2 x double> @constrained_vector_uitofp_v2f64_v2i32(<2 x i32> %x) #0 {
6840 ; CHECK-LABEL: constrained_vector_uitofp_v2f64_v2i32:
6841 ; CHECK: # %bb.0: # %entry
6842 ; CHECK-NEXT: xorpd %xmm1, %xmm1
6843 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
6844 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
6845 ; CHECK-NEXT: orpd %xmm1, %xmm0
6846 ; CHECK-NEXT: subpd %xmm1, %xmm0
6849 ; AVX1-LABEL: constrained_vector_uitofp_v2f64_v2i32:
6850 ; AVX1: # %bb.0: # %entry
6851 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6852 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
6853 ; AVX1-NEXT: # xmm1 = mem[0,0]
6854 ; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
6855 ; AVX1-NEXT: vsubpd %xmm1, %xmm0, %xmm0
6858 ; AVX512-LABEL: constrained_vector_uitofp_v2f64_v2i32:
6859 ; AVX512: # %bb.0: # %entry
6860 ; AVX512-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
6861 ; AVX512-NEXT: vcvtudq2pd %ymm0, %zmm0
6862 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
6863 ; AVX512-NEXT: vzeroupper
6866 %result = call <2 x double>
6867 @llvm.experimental.constrained.uitofp.v2f64.v2i32(<2 x i32> %x,
6868 metadata !"round.dynamic",
6869 metadata !"fpexcept.strict") #0
6870 ret <2 x double> %result
6873 define <2 x float> @constrained_vector_uitofp_v2f32_v2i32(<2 x i32> %x) #0 {
6874 ; CHECK-LABEL: constrained_vector_uitofp_v2f32_v2i32:
6875 ; CHECK: # %bb.0: # %entry
6876 ; CHECK-NEXT: xorpd %xmm1, %xmm1
6877 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
6878 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
6879 ; CHECK-NEXT: orpd %xmm1, %xmm0
6880 ; CHECK-NEXT: subpd %xmm1, %xmm0
6881 ; CHECK-NEXT: cvtpd2ps %xmm0, %xmm0
6884 ; AVX1-LABEL: constrained_vector_uitofp_v2f32_v2i32:
6885 ; AVX1: # %bb.0: # %entry
6886 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6887 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
6888 ; AVX1-NEXT: # xmm1 = mem[0,0]
6889 ; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
6890 ; AVX1-NEXT: vsubpd %xmm1, %xmm0, %xmm0
6891 ; AVX1-NEXT: vcvtpd2ps %xmm0, %xmm0
6894 ; AVX512-LABEL: constrained_vector_uitofp_v2f32_v2i32:
6895 ; AVX512: # %bb.0: # %entry
6896 ; AVX512-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
6897 ; AVX512-NEXT: vcvtudq2ps %zmm0, %zmm0
6898 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
6899 ; AVX512-NEXT: vzeroupper
6902 %result = call <2 x float>
6903 @llvm.experimental.constrained.uitofp.v2f32.v2i32(<2 x i32> %x,
6904 metadata !"round.dynamic",
6905 metadata !"fpexcept.strict") #0
6906 ret <2 x float> %result
6909 define <2 x double> @constrained_vector_uitofp_v2f64_v2i64(<2 x i64> %x) #0 {
6910 ; CHECK-LABEL: constrained_vector_uitofp_v2f64_v2i64:
6911 ; CHECK: # %bb.0: # %entry
6912 ; CHECK-NEXT: movdqa %xmm0, %xmm1
6913 ; CHECK-NEXT: movq %xmm0, %rax
6914 ; CHECK-NEXT: movq %rax, %rcx
6915 ; CHECK-NEXT: shrq %rcx
6916 ; CHECK-NEXT: movl %eax, %edx
6917 ; CHECK-NEXT: andl $1, %edx
6918 ; CHECK-NEXT: orq %rcx, %rdx
6919 ; CHECK-NEXT: testq %rax, %rax
6920 ; CHECK-NEXT: cmovnsq %rax, %rdx
6921 ; CHECK-NEXT: xorps %xmm0, %xmm0
6922 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm0
6923 ; CHECK-NEXT: jns .LBB173_2
6924 ; CHECK-NEXT: # %bb.1:
6925 ; CHECK-NEXT: addsd %xmm0, %xmm0
6926 ; CHECK-NEXT: .LBB173_2: # %entry
6927 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
6928 ; CHECK-NEXT: movq %xmm1, %rax
6929 ; CHECK-NEXT: movq %rax, %rcx
6930 ; CHECK-NEXT: shrq %rcx
6931 ; CHECK-NEXT: movl %eax, %edx
6932 ; CHECK-NEXT: andl $1, %edx
6933 ; CHECK-NEXT: orq %rcx, %rdx
6934 ; CHECK-NEXT: testq %rax, %rax
6935 ; CHECK-NEXT: cmovnsq %rax, %rdx
6936 ; CHECK-NEXT: xorps %xmm1, %xmm1
6937 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm1
6938 ; CHECK-NEXT: jns .LBB173_4
6939 ; CHECK-NEXT: # %bb.3:
6940 ; CHECK-NEXT: addsd %xmm1, %xmm1
6941 ; CHECK-NEXT: .LBB173_4: # %entry
6942 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6945 ; AVX1-LABEL: constrained_vector_uitofp_v2f64_v2i64:
6946 ; AVX1: # %bb.0: # %entry
6947 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
6948 ; AVX1-NEXT: movq %rax, %rcx
6949 ; AVX1-NEXT: shrq %rcx
6950 ; AVX1-NEXT: movl %eax, %edx
6951 ; AVX1-NEXT: andl $1, %edx
6952 ; AVX1-NEXT: orq %rcx, %rdx
6953 ; AVX1-NEXT: testq %rax, %rax
6954 ; AVX1-NEXT: cmovnsq %rax, %rdx
6955 ; AVX1-NEXT: vcvtsi2sd %rdx, %xmm1, %xmm1
6956 ; AVX1-NEXT: jns .LBB173_2
6957 ; AVX1-NEXT: # %bb.1:
6958 ; AVX1-NEXT: vaddsd %xmm1, %xmm1, %xmm1
6959 ; AVX1-NEXT: .LBB173_2: # %entry
6960 ; AVX1-NEXT: vmovq %xmm0, %rax
6961 ; AVX1-NEXT: movq %rax, %rcx
6962 ; AVX1-NEXT: shrq %rcx
6963 ; AVX1-NEXT: movl %eax, %edx
6964 ; AVX1-NEXT: andl $1, %edx
6965 ; AVX1-NEXT: orq %rcx, %rdx
6966 ; AVX1-NEXT: testq %rax, %rax
6967 ; AVX1-NEXT: cmovnsq %rax, %rdx
6968 ; AVX1-NEXT: vcvtsi2sd %rdx, %xmm2, %xmm0
6969 ; AVX1-NEXT: jns .LBB173_4
6970 ; AVX1-NEXT: # %bb.3:
6971 ; AVX1-NEXT: vaddsd %xmm0, %xmm0, %xmm0
6972 ; AVX1-NEXT: .LBB173_4: # %entry
6973 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6976 ; AVX512F-LABEL: constrained_vector_uitofp_v2f64_v2i64:
6977 ; AVX512F: # %bb.0: # %entry
6978 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
6979 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm1, %xmm1
6980 ; AVX512F-NEXT: vmovq %xmm0, %rax
6981 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm2, %xmm0
6982 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
6983 ; AVX512F-NEXT: retq
6985 ; AVX512DQ-LABEL: constrained_vector_uitofp_v2f64_v2i64:
6986 ; AVX512DQ: # %bb.0: # %entry
6987 ; AVX512DQ-NEXT: vmovaps %xmm0, %xmm0
6988 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
6989 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
6990 ; AVX512DQ-NEXT: vzeroupper
6991 ; AVX512DQ-NEXT: retq
6993 %result = call <2 x double>
6994 @llvm.experimental.constrained.uitofp.v2f64.v2i64(<2 x i64> %x,
6995 metadata !"round.dynamic",
6996 metadata !"fpexcept.strict") #0
6997 ret <2 x double> %result
7000 define <2 x float> @constrained_vector_uitofp_v2f32_v2i64(<2 x i64> %x) #0 {
7001 ; CHECK-LABEL: constrained_vector_uitofp_v2f32_v2i64:
7002 ; CHECK: # %bb.0: # %entry
7003 ; CHECK-NEXT: movdqa %xmm0, %xmm1
7004 ; CHECK-NEXT: movq %xmm0, %rax
7005 ; CHECK-NEXT: movq %rax, %rcx
7006 ; CHECK-NEXT: shrq %rcx
7007 ; CHECK-NEXT: movl %eax, %edx
7008 ; CHECK-NEXT: andl $1, %edx
7009 ; CHECK-NEXT: orq %rcx, %rdx
7010 ; CHECK-NEXT: testq %rax, %rax
7011 ; CHECK-NEXT: cmovnsq %rax, %rdx
7012 ; CHECK-NEXT: xorps %xmm0, %xmm0
7013 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm0
7014 ; CHECK-NEXT: jns .LBB174_2
7015 ; CHECK-NEXT: # %bb.1:
7016 ; CHECK-NEXT: addss %xmm0, %xmm0
7017 ; CHECK-NEXT: .LBB174_2: # %entry
7018 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
7019 ; CHECK-NEXT: movq %xmm1, %rax
7020 ; CHECK-NEXT: movq %rax, %rcx
7021 ; CHECK-NEXT: shrq %rcx
7022 ; CHECK-NEXT: movl %eax, %edx
7023 ; CHECK-NEXT: andl $1, %edx
7024 ; CHECK-NEXT: orq %rcx, %rdx
7025 ; CHECK-NEXT: testq %rax, %rax
7026 ; CHECK-NEXT: cmovnsq %rax, %rdx
7027 ; CHECK-NEXT: xorps %xmm1, %xmm1
7028 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm1
7029 ; CHECK-NEXT: jns .LBB174_4
7030 ; CHECK-NEXT: # %bb.3:
7031 ; CHECK-NEXT: addss %xmm1, %xmm1
7032 ; CHECK-NEXT: .LBB174_4: # %entry
7033 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
7036 ; AVX1-LABEL: constrained_vector_uitofp_v2f32_v2i64:
7037 ; AVX1: # %bb.0: # %entry
7038 ; AVX1-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
7039 ; AVX1-NEXT: vpsrlq $1, %xmm0, %xmm2
7040 ; AVX1-NEXT: vpor %xmm1, %xmm2, %xmm1
7041 ; AVX1-NEXT: vblendvpd %xmm0, %xmm1, %xmm0, %xmm1
7042 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
7043 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
7044 ; AVX1-NEXT: vmovq %xmm1, %rax
7045 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
7046 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],zero,zero
7047 ; AVX1-NEXT: vaddps %xmm1, %xmm1, %xmm2
7048 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
7049 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm3, %xmm0
7050 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,3,2,3]
7051 ; AVX1-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
7054 ; AVX512-LABEL: constrained_vector_uitofp_v2f32_v2i64:
7055 ; AVX512: # %bb.0: # %entry
7056 ; AVX512-NEXT: vpextrq $1, %xmm0, %rax
7057 ; AVX512-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
7058 ; AVX512-NEXT: vmovq %xmm0, %rax
7059 ; AVX512-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
7060 ; AVX512-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
7063 %result = call <2 x float>
7064 @llvm.experimental.constrained.uitofp.v2f32.v2i64(<2 x i64> %x,
7065 metadata !"round.dynamic",
7066 metadata !"fpexcept.strict") #0
7067 ret <2 x float> %result
7070 define <3 x double> @constrained_vector_uitofp_v3f64_v3i32(<3 x i32> %x) #0 {
7071 ; CHECK-LABEL: constrained_vector_uitofp_v3f64_v3i32:
7072 ; CHECK: # %bb.0: # %entry
7073 ; CHECK-NEXT: movd %xmm0, %eax
7074 ; CHECK-NEXT: cvtsi2sd %rax, %xmm2
7075 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,1,1]
7076 ; CHECK-NEXT: movd %xmm1, %eax
7077 ; CHECK-NEXT: xorps %xmm1, %xmm1
7078 ; CHECK-NEXT: cvtsi2sd %rax, %xmm1
7079 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
7080 ; CHECK-NEXT: movd %xmm0, %eax
7081 ; CHECK-NEXT: xorps %xmm0, %xmm0
7082 ; CHECK-NEXT: cvtsi2sd %rax, %xmm0
7083 ; CHECK-NEXT: movsd %xmm0, -{{[0-9]+}}(%rsp)
7084 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
7086 ; CHECK-NEXT: movapd %xmm2, %xmm0
7089 ; AVX1-LABEL: constrained_vector_uitofp_v3f64_v3i32:
7090 ; AVX1: # %bb.0: # %entry
7091 ; AVX1-NEXT: vextractps $1, %xmm0, %eax
7092 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
7093 ; AVX1-NEXT: vmovd %xmm0, %eax
7094 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
7095 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
7096 ; AVX1-NEXT: vpextrd $2, %xmm0, %eax
7097 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
7098 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7101 ; AVX512-LABEL: constrained_vector_uitofp_v3f64_v3i32:
7102 ; AVX512: # %bb.0: # %entry
7103 ; AVX512-NEXT: vextractps $1, %xmm0, %eax
7104 ; AVX512-NEXT: vcvtusi2sd %eax, %xmm1, %xmm1
7105 ; AVX512-NEXT: vmovd %xmm0, %eax
7106 ; AVX512-NEXT: vcvtusi2sd %eax, %xmm2, %xmm2
7107 ; AVX512-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
7108 ; AVX512-NEXT: vpextrd $2, %xmm0, %eax
7109 ; AVX512-NEXT: vcvtusi2sd %eax, %xmm3, %xmm0
7110 ; AVX512-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7113 %result = call <3 x double>
7114 @llvm.experimental.constrained.uitofp.v3f64.v3i32(<3 x i32> %x,
7115 metadata !"round.dynamic",
7116 metadata !"fpexcept.strict") #0
7117 ret <3 x double> %result
7120 define <3 x float> @constrained_vector_uitofp_v3f32_v3i32(<3 x i32> %x) #0 {
7121 ; CHECK-LABEL: constrained_vector_uitofp_v3f32_v3i32:
7122 ; CHECK: # %bb.0: # %entry
7123 ; CHECK-NEXT: movd %xmm0, %eax
7124 ; CHECK-NEXT: cvtsi2ss %rax, %xmm1
7125 ; CHECK-NEXT: pshufd {{.*#+}} xmm2 = xmm0[1,1,1,1]
7126 ; CHECK-NEXT: movd %xmm2, %eax
7127 ; CHECK-NEXT: xorps %xmm2, %xmm2
7128 ; CHECK-NEXT: cvtsi2ss %rax, %xmm2
7129 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
7130 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
7131 ; CHECK-NEXT: movd %xmm0, %eax
7132 ; CHECK-NEXT: xorps %xmm0, %xmm0
7133 ; CHECK-NEXT: cvtsi2ss %rax, %xmm0
7134 ; CHECK-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm0[0]
7135 ; CHECK-NEXT: movaps %xmm1, %xmm0
7138 ; AVX1-LABEL: constrained_vector_uitofp_v3f32_v3i32:
7139 ; AVX1: # %bb.0: # %entry
7140 ; AVX1-NEXT: vextractps $1, %xmm0, %eax
7141 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
7142 ; AVX1-NEXT: vmovd %xmm0, %eax
7143 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
7144 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
7145 ; AVX1-NEXT: vpextrd $2, %xmm0, %eax
7146 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
7147 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
7150 ; AVX512-LABEL: constrained_vector_uitofp_v3f32_v3i32:
7151 ; AVX512: # %bb.0: # %entry
7152 ; AVX512-NEXT: vextractps $1, %xmm0, %eax
7153 ; AVX512-NEXT: vcvtusi2ss %eax, %xmm1, %xmm1
7154 ; AVX512-NEXT: vmovd %xmm0, %eax
7155 ; AVX512-NEXT: vcvtusi2ss %eax, %xmm2, %xmm2
7156 ; AVX512-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
7157 ; AVX512-NEXT: vpextrd $2, %xmm0, %eax
7158 ; AVX512-NEXT: vcvtusi2ss %eax, %xmm3, %xmm0
7159 ; AVX512-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
7162 %result = call <3 x float>
7163 @llvm.experimental.constrained.uitofp.v3f32.v3i32(<3 x i32> %x,
7164 metadata !"round.dynamic",
7165 metadata !"fpexcept.strict") #0
7166 ret <3 x float> %result
7169 define <3 x double> @constrained_vector_uitofp_v3f64_v3i64(<3 x i64> %x) #0 {
7170 ; CHECK-LABEL: constrained_vector_uitofp_v3f64_v3i64:
7171 ; CHECK: # %bb.0: # %entry
7172 ; CHECK-NEXT: movq %rdi, %rax
7173 ; CHECK-NEXT: shrq %rax
7174 ; CHECK-NEXT: movl %edi, %ecx
7175 ; CHECK-NEXT: andl $1, %ecx
7176 ; CHECK-NEXT: orq %rax, %rcx
7177 ; CHECK-NEXT: testq %rdi, %rdi
7178 ; CHECK-NEXT: cmovnsq %rdi, %rcx
7179 ; CHECK-NEXT: cvtsi2sd %rcx, %xmm0
7180 ; CHECK-NEXT: jns .LBB177_2
7181 ; CHECK-NEXT: # %bb.1:
7182 ; CHECK-NEXT: addsd %xmm0, %xmm0
7183 ; CHECK-NEXT: .LBB177_2: # %entry
7184 ; CHECK-NEXT: movq %rsi, %rax
7185 ; CHECK-NEXT: shrq %rax
7186 ; CHECK-NEXT: movl %esi, %ecx
7187 ; CHECK-NEXT: andl $1, %ecx
7188 ; CHECK-NEXT: orq %rax, %rcx
7189 ; CHECK-NEXT: testq %rsi, %rsi
7190 ; CHECK-NEXT: cmovnsq %rsi, %rcx
7191 ; CHECK-NEXT: cvtsi2sd %rcx, %xmm1
7192 ; CHECK-NEXT: jns .LBB177_4
7193 ; CHECK-NEXT: # %bb.3:
7194 ; CHECK-NEXT: addsd %xmm1, %xmm1
7195 ; CHECK-NEXT: .LBB177_4: # %entry
7196 ; CHECK-NEXT: movq %rdx, %rax
7197 ; CHECK-NEXT: shrq %rax
7198 ; CHECK-NEXT: movl %edx, %ecx
7199 ; CHECK-NEXT: andl $1, %ecx
7200 ; CHECK-NEXT: orq %rax, %rcx
7201 ; CHECK-NEXT: testq %rdx, %rdx
7202 ; CHECK-NEXT: cmovnsq %rdx, %rcx
7203 ; CHECK-NEXT: cvtsi2sd %rcx, %xmm2
7204 ; CHECK-NEXT: jns .LBB177_6
7205 ; CHECK-NEXT: # %bb.5:
7206 ; CHECK-NEXT: addsd %xmm2, %xmm2
7207 ; CHECK-NEXT: .LBB177_6: # %entry
7208 ; CHECK-NEXT: movsd %xmm2, -{{[0-9]+}}(%rsp)
7209 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
7213 ; AVX1-LABEL: constrained_vector_uitofp_v3f64_v3i64:
7214 ; AVX1: # %bb.0: # %entry
7215 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
7216 ; AVX1-NEXT: movq %rax, %rcx
7217 ; AVX1-NEXT: shrq %rcx
7218 ; AVX1-NEXT: movl %eax, %edx
7219 ; AVX1-NEXT: andl $1, %edx
7220 ; AVX1-NEXT: orq %rcx, %rdx
7221 ; AVX1-NEXT: testq %rax, %rax
7222 ; AVX1-NEXT: cmovnsq %rax, %rdx
7223 ; AVX1-NEXT: vcvtsi2sd %rdx, %xmm1, %xmm1
7224 ; AVX1-NEXT: jns .LBB177_2
7225 ; AVX1-NEXT: # %bb.1:
7226 ; AVX1-NEXT: vaddsd %xmm1, %xmm1, %xmm1
7227 ; AVX1-NEXT: .LBB177_2: # %entry
7228 ; AVX1-NEXT: vmovq %xmm0, %rax
7229 ; AVX1-NEXT: movq %rax, %rcx
7230 ; AVX1-NEXT: shrq %rcx
7231 ; AVX1-NEXT: movl %eax, %edx
7232 ; AVX1-NEXT: andl $1, %edx
7233 ; AVX1-NEXT: orq %rcx, %rdx
7234 ; AVX1-NEXT: testq %rax, %rax
7235 ; AVX1-NEXT: cmovnsq %rax, %rdx
7236 ; AVX1-NEXT: vcvtsi2sd %rdx, %xmm2, %xmm2
7237 ; AVX1-NEXT: jns .LBB177_4
7238 ; AVX1-NEXT: # %bb.3:
7239 ; AVX1-NEXT: vaddsd %xmm2, %xmm2, %xmm2
7240 ; AVX1-NEXT: .LBB177_4: # %entry
7241 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
7242 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7243 ; AVX1-NEXT: vmovq %xmm0, %rax
7244 ; AVX1-NEXT: movq %rax, %rcx
7245 ; AVX1-NEXT: shrq %rcx
7246 ; AVX1-NEXT: movl %eax, %edx
7247 ; AVX1-NEXT: andl $1, %edx
7248 ; AVX1-NEXT: orq %rcx, %rdx
7249 ; AVX1-NEXT: testq %rax, %rax
7250 ; AVX1-NEXT: cmovnsq %rax, %rdx
7251 ; AVX1-NEXT: vcvtsi2sd %rdx, %xmm3, %xmm0
7252 ; AVX1-NEXT: jns .LBB177_6
7253 ; AVX1-NEXT: # %bb.5:
7254 ; AVX1-NEXT: vaddsd %xmm0, %xmm0, %xmm0
7255 ; AVX1-NEXT: .LBB177_6: # %entry
7256 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7259 ; AVX512-LABEL: constrained_vector_uitofp_v3f64_v3i64:
7260 ; AVX512: # %bb.0: # %entry
7261 ; AVX512-NEXT: vpextrq $1, %xmm0, %rax
7262 ; AVX512-NEXT: vcvtusi2sd %rax, %xmm1, %xmm1
7263 ; AVX512-NEXT: vmovq %xmm0, %rax
7264 ; AVX512-NEXT: vcvtusi2sd %rax, %xmm2, %xmm2
7265 ; AVX512-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm2[0],xmm1[0]
7266 ; AVX512-NEXT: vextracti128 $1, %ymm0, %xmm0
7267 ; AVX512-NEXT: vmovq %xmm0, %rax
7268 ; AVX512-NEXT: vcvtusi2sd %rax, %xmm3, %xmm0
7269 ; AVX512-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7272 %result = call <3 x double>
7273 @llvm.experimental.constrained.uitofp.v3f64.v3i64(<3 x i64> %x,
7274 metadata !"round.dynamic",
7275 metadata !"fpexcept.strict") #0
7276 ret <3 x double> %result
7279 define <3 x float> @constrained_vector_uitofp_v3f32_v3i64(<3 x i64> %x) #0 {
7280 ; CHECK-LABEL: constrained_vector_uitofp_v3f32_v3i64:
7281 ; CHECK: # %bb.0: # %entry
7282 ; CHECK-NEXT: movq %rsi, %rax
7283 ; CHECK-NEXT: shrq %rax
7284 ; CHECK-NEXT: movl %esi, %ecx
7285 ; CHECK-NEXT: andl $1, %ecx
7286 ; CHECK-NEXT: orq %rax, %rcx
7287 ; CHECK-NEXT: testq %rsi, %rsi
7288 ; CHECK-NEXT: cmovnsq %rsi, %rcx
7289 ; CHECK-NEXT: cvtsi2ss %rcx, %xmm1
7290 ; CHECK-NEXT: jns .LBB178_2
7291 ; CHECK-NEXT: # %bb.1:
7292 ; CHECK-NEXT: addss %xmm1, %xmm1
7293 ; CHECK-NEXT: .LBB178_2: # %entry
7294 ; CHECK-NEXT: movq %rdi, %rax
7295 ; CHECK-NEXT: shrq %rax
7296 ; CHECK-NEXT: movl %edi, %ecx
7297 ; CHECK-NEXT: andl $1, %ecx
7298 ; CHECK-NEXT: orq %rax, %rcx
7299 ; CHECK-NEXT: testq %rdi, %rdi
7300 ; CHECK-NEXT: cmovnsq %rdi, %rcx
7301 ; CHECK-NEXT: cvtsi2ss %rcx, %xmm0
7302 ; CHECK-NEXT: jns .LBB178_4
7303 ; CHECK-NEXT: # %bb.3:
7304 ; CHECK-NEXT: addss %xmm0, %xmm0
7305 ; CHECK-NEXT: .LBB178_4: # %entry
7306 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
7307 ; CHECK-NEXT: movq %rdx, %rax
7308 ; CHECK-NEXT: shrq %rax
7309 ; CHECK-NEXT: movl %edx, %ecx
7310 ; CHECK-NEXT: andl $1, %ecx
7311 ; CHECK-NEXT: orq %rax, %rcx
7312 ; CHECK-NEXT: testq %rdx, %rdx
7313 ; CHECK-NEXT: cmovnsq %rdx, %rcx
7314 ; CHECK-NEXT: xorps %xmm1, %xmm1
7315 ; CHECK-NEXT: cvtsi2ss %rcx, %xmm1
7316 ; CHECK-NEXT: jns .LBB178_6
7317 ; CHECK-NEXT: # %bb.5:
7318 ; CHECK-NEXT: addss %xmm1, %xmm1
7319 ; CHECK-NEXT: .LBB178_6: # %entry
7320 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
7323 ; AVX1-LABEL: constrained_vector_uitofp_v3f32_v3i64:
7324 ; AVX1: # %bb.0: # %entry
7325 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
7326 ; AVX1-NEXT: movq %rax, %rcx
7327 ; AVX1-NEXT: shrq %rcx
7328 ; AVX1-NEXT: movl %eax, %edx
7329 ; AVX1-NEXT: andl $1, %edx
7330 ; AVX1-NEXT: orq %rcx, %rdx
7331 ; AVX1-NEXT: testq %rax, %rax
7332 ; AVX1-NEXT: cmovnsq %rax, %rdx
7333 ; AVX1-NEXT: vcvtsi2ss %rdx, %xmm1, %xmm1
7334 ; AVX1-NEXT: jns .LBB178_2
7335 ; AVX1-NEXT: # %bb.1:
7336 ; AVX1-NEXT: vaddss %xmm1, %xmm1, %xmm1
7337 ; AVX1-NEXT: .LBB178_2: # %entry
7338 ; AVX1-NEXT: vmovq %xmm0, %rax
7339 ; AVX1-NEXT: movq %rax, %rcx
7340 ; AVX1-NEXT: shrq %rcx
7341 ; AVX1-NEXT: movl %eax, %edx
7342 ; AVX1-NEXT: andl $1, %edx
7343 ; AVX1-NEXT: orq %rcx, %rdx
7344 ; AVX1-NEXT: testq %rax, %rax
7345 ; AVX1-NEXT: cmovnsq %rax, %rdx
7346 ; AVX1-NEXT: vcvtsi2ss %rdx, %xmm2, %xmm2
7347 ; AVX1-NEXT: jns .LBB178_4
7348 ; AVX1-NEXT: # %bb.3:
7349 ; AVX1-NEXT: vaddss %xmm2, %xmm2, %xmm2
7350 ; AVX1-NEXT: .LBB178_4: # %entry
7351 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
7352 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7353 ; AVX1-NEXT: vmovq %xmm0, %rax
7354 ; AVX1-NEXT: movq %rax, %rcx
7355 ; AVX1-NEXT: shrq %rcx
7356 ; AVX1-NEXT: movl %eax, %edx
7357 ; AVX1-NEXT: andl $1, %edx
7358 ; AVX1-NEXT: orq %rcx, %rdx
7359 ; AVX1-NEXT: testq %rax, %rax
7360 ; AVX1-NEXT: cmovnsq %rax, %rdx
7361 ; AVX1-NEXT: vcvtsi2ss %rdx, %xmm3, %xmm0
7362 ; AVX1-NEXT: jns .LBB178_6
7363 ; AVX1-NEXT: # %bb.5:
7364 ; AVX1-NEXT: vaddss %xmm0, %xmm0, %xmm0
7365 ; AVX1-NEXT: .LBB178_6: # %entry
7366 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
7367 ; AVX1-NEXT: vzeroupper
7370 ; AVX512-LABEL: constrained_vector_uitofp_v3f32_v3i64:
7371 ; AVX512: # %bb.0: # %entry
7372 ; AVX512-NEXT: vpextrq $1, %xmm0, %rax
7373 ; AVX512-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
7374 ; AVX512-NEXT: vmovq %xmm0, %rax
7375 ; AVX512-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
7376 ; AVX512-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
7377 ; AVX512-NEXT: vextracti128 $1, %ymm0, %xmm0
7378 ; AVX512-NEXT: vmovq %xmm0, %rax
7379 ; AVX512-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
7380 ; AVX512-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1],xmm0[0],xmm1[3]
7381 ; AVX512-NEXT: vzeroupper
7384 %result = call <3 x float>
7385 @llvm.experimental.constrained.uitofp.v3f32.v3i64(<3 x i64> %x,
7386 metadata !"round.dynamic",
7387 metadata !"fpexcept.strict") #0
7388 ret <3 x float> %result
7391 define <4 x double> @constrained_vector_uitofp_v4f64_v4i32(<4 x i32> %x) #0 {
7392 ; CHECK-LABEL: constrained_vector_uitofp_v4f64_v4i32:
7393 ; CHECK: # %bb.0: # %entry
7394 ; CHECK-NEXT: xorpd %xmm2, %xmm2
7395 ; CHECK-NEXT: movapd %xmm0, %xmm1
7396 ; CHECK-NEXT: unpckhps {{.*#+}} xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
7397 ; CHECK-NEXT: movapd {{.*#+}} xmm3 = [4.503599627370496E+15,4.503599627370496E+15]
7398 ; CHECK-NEXT: orpd %xmm3, %xmm1
7399 ; CHECK-NEXT: subpd %xmm3, %xmm1
7400 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
7401 ; CHECK-NEXT: orpd %xmm3, %xmm0
7402 ; CHECK-NEXT: subpd %xmm3, %xmm0
7405 ; AVX1-LABEL: constrained_vector_uitofp_v4f64_v4i32:
7406 ; AVX1: # %bb.0: # %entry
7407 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
7408 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
7409 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7410 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
7411 ; AVX1-NEXT: vbroadcastsd {{.*#+}} ymm1 = [4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15]
7412 ; AVX1-NEXT: vorpd %ymm1, %ymm0, %ymm0
7413 ; AVX1-NEXT: vsubpd %ymm1, %ymm0, %ymm0
7416 ; AVX512-LABEL: constrained_vector_uitofp_v4f64_v4i32:
7417 ; AVX512: # %bb.0: # %entry
7418 ; AVX512-NEXT: vmovaps %xmm0, %xmm0
7419 ; AVX512-NEXT: vcvtudq2pd %ymm0, %zmm0
7420 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
7423 %result = call <4 x double>
7424 @llvm.experimental.constrained.uitofp.v4f64.v4i32(<4 x i32> %x,
7425 metadata !"round.dynamic",
7426 metadata !"fpexcept.strict") #0
7427 ret <4 x double> %result
7430 define <4 x float> @constrained_vector_uitofp_v4f32_v4i32(<4 x i32> %x) #0 {
7431 ; CHECK-LABEL: constrained_vector_uitofp_v4f32_v4i32:
7432 ; CHECK: # %bb.0: # %entry
7433 ; CHECK-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
7434 ; CHECK-NEXT: pand %xmm0, %xmm1
7435 ; CHECK-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
7436 ; CHECK-NEXT: psrld $16, %xmm0
7437 ; CHECK-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
7438 ; CHECK-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
7439 ; CHECK-NEXT: addps %xmm1, %xmm0
7442 ; AVX1-LABEL: constrained_vector_uitofp_v4f32_v4i32:
7443 ; AVX1: # %bb.0: # %entry
7444 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
7445 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
7446 ; AVX1-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
7447 ; AVX1-NEXT: vsubps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
7448 ; AVX1-NEXT: vaddps %xmm0, %xmm1, %xmm0
7451 ; AVX512-LABEL: constrained_vector_uitofp_v4f32_v4i32:
7452 ; AVX512: # %bb.0: # %entry
7453 ; AVX512-NEXT: vmovaps %xmm0, %xmm0
7454 ; AVX512-NEXT: vcvtudq2ps %zmm0, %zmm0
7455 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
7456 ; AVX512-NEXT: vzeroupper
7459 %result = call <4 x float>
7460 @llvm.experimental.constrained.uitofp.v4f32.v4i32(<4 x i32> %x,
7461 metadata !"round.dynamic",
7462 metadata !"fpexcept.strict") #0
7463 ret <4 x float> %result
7466 define <4 x double> @constrained_vector_uitofp_v4f64_v4i64(<4 x i64> %x) #0 {
7467 ; CHECK-LABEL: constrained_vector_uitofp_v4f64_v4i64:
7468 ; CHECK: # %bb.0: # %entry
7469 ; CHECK-NEXT: movdqa %xmm0, %xmm2
7470 ; CHECK-NEXT: movq %xmm0, %rax
7471 ; CHECK-NEXT: movq %rax, %rcx
7472 ; CHECK-NEXT: shrq %rcx
7473 ; CHECK-NEXT: movl %eax, %edx
7474 ; CHECK-NEXT: andl $1, %edx
7475 ; CHECK-NEXT: orq %rcx, %rdx
7476 ; CHECK-NEXT: testq %rax, %rax
7477 ; CHECK-NEXT: cmovnsq %rax, %rdx
7478 ; CHECK-NEXT: xorps %xmm0, %xmm0
7479 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm0
7480 ; CHECK-NEXT: jns .LBB181_2
7481 ; CHECK-NEXT: # %bb.1:
7482 ; CHECK-NEXT: addsd %xmm0, %xmm0
7483 ; CHECK-NEXT: .LBB181_2: # %entry
7484 ; CHECK-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
7485 ; CHECK-NEXT: movq %xmm2, %rax
7486 ; CHECK-NEXT: movq %rax, %rcx
7487 ; CHECK-NEXT: shrq %rcx
7488 ; CHECK-NEXT: movl %eax, %edx
7489 ; CHECK-NEXT: andl $1, %edx
7490 ; CHECK-NEXT: orq %rcx, %rdx
7491 ; CHECK-NEXT: testq %rax, %rax
7492 ; CHECK-NEXT: cmovnsq %rax, %rdx
7493 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm3
7494 ; CHECK-NEXT: jns .LBB181_4
7495 ; CHECK-NEXT: # %bb.3:
7496 ; CHECK-NEXT: addsd %xmm3, %xmm3
7497 ; CHECK-NEXT: .LBB181_4: # %entry
7498 ; CHECK-NEXT: movq %xmm1, %rax
7499 ; CHECK-NEXT: movq %rax, %rcx
7500 ; CHECK-NEXT: shrq %rcx
7501 ; CHECK-NEXT: movl %eax, %edx
7502 ; CHECK-NEXT: andl $1, %edx
7503 ; CHECK-NEXT: orq %rcx, %rdx
7504 ; CHECK-NEXT: testq %rax, %rax
7505 ; CHECK-NEXT: cmovnsq %rax, %rdx
7506 ; CHECK-NEXT: xorps %xmm2, %xmm2
7507 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm2
7508 ; CHECK-NEXT: jns .LBB181_6
7509 ; CHECK-NEXT: # %bb.5:
7510 ; CHECK-NEXT: addsd %xmm2, %xmm2
7511 ; CHECK-NEXT: .LBB181_6: # %entry
7512 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm3[0]
7513 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
7514 ; CHECK-NEXT: movq %xmm1, %rax
7515 ; CHECK-NEXT: movq %rax, %rcx
7516 ; CHECK-NEXT: shrq %rcx
7517 ; CHECK-NEXT: movl %eax, %edx
7518 ; CHECK-NEXT: andl $1, %edx
7519 ; CHECK-NEXT: orq %rcx, %rdx
7520 ; CHECK-NEXT: testq %rax, %rax
7521 ; CHECK-NEXT: cmovnsq %rax, %rdx
7522 ; CHECK-NEXT: xorps %xmm1, %xmm1
7523 ; CHECK-NEXT: cvtsi2sd %rdx, %xmm1
7524 ; CHECK-NEXT: jns .LBB181_8
7525 ; CHECK-NEXT: # %bb.7:
7526 ; CHECK-NEXT: addsd %xmm1, %xmm1
7527 ; CHECK-NEXT: .LBB181_8: # %entry
7528 ; CHECK-NEXT: unpcklpd {{.*#+}} xmm2 = xmm2[0],xmm1[0]
7529 ; CHECK-NEXT: movapd %xmm2, %xmm1
7532 ; AVX1-LABEL: constrained_vector_uitofp_v4f64_v4i64:
7533 ; AVX1: # %bb.0: # %entry
7534 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
7535 ; AVX1-NEXT: vpextrd $2, %xmm1, %eax
7536 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
7537 ; AVX1-NEXT: vmovd %xmm1, %eax
7538 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm3
7539 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm2 = xmm3[0],xmm2[0]
7540 ; AVX1-NEXT: vextractps $2, %xmm0, %eax
7541 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm4, %xmm3
7542 ; AVX1-NEXT: vmovq %xmm0, %rax
7543 ; AVX1-NEXT: movl %eax, %eax
7544 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm4, %xmm4
7545 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm3 = xmm4[0],xmm3[0]
7546 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm3, %ymm2
7547 ; AVX1-NEXT: vpextrd $3, %xmm1, %eax
7548 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm5, %xmm3
7549 ; AVX1-NEXT: vpextrd $1, %xmm1, %eax
7550 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm5, %xmm1
7551 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm3[0]
7552 ; AVX1-NEXT: vpextrd $3, %xmm0, %eax
7553 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm5, %xmm3
7554 ; AVX1-NEXT: vpextrd $1, %xmm0, %eax
7555 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm5, %xmm0
7556 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm3[0]
7557 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
7558 ; AVX1-NEXT: vmulpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
7559 ; AVX1-NEXT: vaddpd %ymm2, %ymm0, %ymm0
7562 ; AVX512F-LABEL: constrained_vector_uitofp_v4f64_v4i64:
7563 ; AVX512F: # %bb.0: # %entry
7564 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
7565 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
7566 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm2, %xmm2
7567 ; AVX512F-NEXT: vmovq %xmm1, %rax
7568 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm3, %xmm1
7569 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
7570 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
7571 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm3, %xmm2
7572 ; AVX512F-NEXT: vmovq %xmm0, %rax
7573 ; AVX512F-NEXT: vcvtusi2sd %rax, %xmm3, %xmm0
7574 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
7575 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
7576 ; AVX512F-NEXT: retq
7578 ; AVX512DQ-LABEL: constrained_vector_uitofp_v4f64_v4i64:
7579 ; AVX512DQ: # %bb.0: # %entry
7580 ; AVX512DQ-NEXT: vmovaps %ymm0, %ymm0
7581 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
7582 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
7583 ; AVX512DQ-NEXT: retq
7585 %result = call <4 x double>
7586 @llvm.experimental.constrained.uitofp.v4f64.v4i64(<4 x i64> %x,
7587 metadata !"round.dynamic",
7588 metadata !"fpexcept.strict") #0
7589 ret <4 x double> %result
7592 define <4 x float> @constrained_vector_uitofp_v4f32_v4i64(<4 x i64> %x) #0 {
7593 ; CHECK-LABEL: constrained_vector_uitofp_v4f32_v4i64:
7594 ; CHECK: # %bb.0: # %entry
7595 ; CHECK-NEXT: movq %xmm1, %rax
7596 ; CHECK-NEXT: movq %rax, %rcx
7597 ; CHECK-NEXT: shrq %rcx
7598 ; CHECK-NEXT: movl %eax, %edx
7599 ; CHECK-NEXT: andl $1, %edx
7600 ; CHECK-NEXT: orq %rcx, %rdx
7601 ; CHECK-NEXT: testq %rax, %rax
7602 ; CHECK-NEXT: cmovnsq %rax, %rdx
7603 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm2
7604 ; CHECK-NEXT: jns .LBB182_2
7605 ; CHECK-NEXT: # %bb.1:
7606 ; CHECK-NEXT: addss %xmm2, %xmm2
7607 ; CHECK-NEXT: .LBB182_2: # %entry
7608 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
7609 ; CHECK-NEXT: movq %xmm1, %rax
7610 ; CHECK-NEXT: movq %rax, %rcx
7611 ; CHECK-NEXT: shrq %rcx
7612 ; CHECK-NEXT: movl %eax, %edx
7613 ; CHECK-NEXT: andl $1, %edx
7614 ; CHECK-NEXT: orq %rcx, %rdx
7615 ; CHECK-NEXT: testq %rax, %rax
7616 ; CHECK-NEXT: cmovnsq %rax, %rdx
7617 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm3
7618 ; CHECK-NEXT: jns .LBB182_4
7619 ; CHECK-NEXT: # %bb.3:
7620 ; CHECK-NEXT: addss %xmm3, %xmm3
7621 ; CHECK-NEXT: .LBB182_4: # %entry
7622 ; CHECK-NEXT: movq %xmm0, %rax
7623 ; CHECK-NEXT: movq %rax, %rcx
7624 ; CHECK-NEXT: shrq %rcx
7625 ; CHECK-NEXT: movl %eax, %edx
7626 ; CHECK-NEXT: andl $1, %edx
7627 ; CHECK-NEXT: orq %rcx, %rdx
7628 ; CHECK-NEXT: testq %rax, %rax
7629 ; CHECK-NEXT: cmovnsq %rax, %rdx
7630 ; CHECK-NEXT: xorps %xmm1, %xmm1
7631 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm1
7632 ; CHECK-NEXT: jns .LBB182_6
7633 ; CHECK-NEXT: # %bb.5:
7634 ; CHECK-NEXT: addss %xmm1, %xmm1
7635 ; CHECK-NEXT: .LBB182_6: # %entry
7636 ; CHECK-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
7637 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
7638 ; CHECK-NEXT: movq %xmm0, %rax
7639 ; CHECK-NEXT: movq %rax, %rcx
7640 ; CHECK-NEXT: shrq %rcx
7641 ; CHECK-NEXT: movl %eax, %edx
7642 ; CHECK-NEXT: andl $1, %edx
7643 ; CHECK-NEXT: orq %rcx, %rdx
7644 ; CHECK-NEXT: testq %rax, %rax
7645 ; CHECK-NEXT: cmovnsq %rax, %rdx
7646 ; CHECK-NEXT: xorps %xmm0, %xmm0
7647 ; CHECK-NEXT: cvtsi2ss %rdx, %xmm0
7648 ; CHECK-NEXT: jns .LBB182_8
7649 ; CHECK-NEXT: # %bb.7:
7650 ; CHECK-NEXT: addss %xmm0, %xmm0
7651 ; CHECK-NEXT: .LBB182_8: # %entry
7652 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
7653 ; CHECK-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
7654 ; CHECK-NEXT: movaps %xmm1, %xmm0
7657 ; AVX1-LABEL: constrained_vector_uitofp_v4f32_v4i64:
7658 ; AVX1: # %bb.0: # %entry
7659 ; AVX1-NEXT: vpsrlq $1, %xmm0, %xmm1
7660 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
7661 ; AVX1-NEXT: vpsrlq $1, %xmm2, %xmm3
7662 ; AVX1-NEXT: vinsertf128 $1, %xmm3, %ymm1, %ymm1
7663 ; AVX1-NEXT: vandpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm3
7664 ; AVX1-NEXT: vorpd %ymm3, %ymm1, %ymm1
7665 ; AVX1-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm1
7666 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
7667 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm3
7668 ; AVX1-NEXT: vmovq %xmm1, %rax
7669 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
7670 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm4[0],xmm3[0],xmm4[2,3]
7671 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm1
7672 ; AVX1-NEXT: vmovq %xmm1, %rax
7673 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
7674 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0],xmm3[3]
7675 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
7676 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
7677 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm3[0,1,2],xmm1[0]
7678 ; AVX1-NEXT: vaddps %xmm1, %xmm1, %xmm3
7679 ; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
7680 ; AVX1-NEXT: vblendvps %xmm0, %xmm3, %xmm1, %xmm0
7681 ; AVX1-NEXT: vzeroupper
7684 ; AVX512F-LABEL: constrained_vector_uitofp_v4f32_v4i64:
7685 ; AVX512F: # %bb.0: # %entry
7686 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
7687 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
7688 ; AVX512F-NEXT: vmovq %xmm0, %rax
7689 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
7690 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
7691 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
7692 ; AVX512F-NEXT: vmovq %xmm0, %rax
7693 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
7694 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
7695 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
7696 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
7697 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
7698 ; AVX512F-NEXT: vzeroupper
7699 ; AVX512F-NEXT: retq
7701 ; AVX512DQ-LABEL: constrained_vector_uitofp_v4f32_v4i64:
7702 ; AVX512DQ: # %bb.0: # %entry
7703 ; AVX512DQ-NEXT: vmovaps %ymm0, %ymm0
7704 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
7705 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
7706 ; AVX512DQ-NEXT: vzeroupper
7707 ; AVX512DQ-NEXT: retq
7709 %result = call <4 x float>
7710 @llvm.experimental.constrained.uitofp.v4f32.v4i64(<4 x i64> %x,
7711 metadata !"round.dynamic",
7712 metadata !"fpexcept.strict") #0
7713 ret <4 x float> %result
7716 ; Simple test to make sure we don't fuse vselect+strict_fadd into a masked operation.
7717 define <16 x float> @vpaddd_mask_test(<16 x float> %i, <16 x float> %j, <16 x i32> %mask1) nounwind readnone strictfp {
7718 ; CHECK-LABEL: vpaddd_mask_test:
7720 ; CHECK-NEXT: pxor %xmm10, %xmm10
7721 ; CHECK-NEXT: movdqa {{[0-9]+}}(%rsp), %xmm8
7722 ; CHECK-NEXT: pcmpeqd %xmm10, %xmm8
7723 ; CHECK-NEXT: movdqa {{[0-9]+}}(%rsp), %xmm9
7724 ; CHECK-NEXT: pcmpeqd %xmm10, %xmm9
7725 ; CHECK-NEXT: movdqa {{[0-9]+}}(%rsp), %xmm11
7726 ; CHECK-NEXT: pcmpeqd %xmm10, %xmm11
7727 ; CHECK-NEXT: pcmpeqd {{[0-9]+}}(%rsp), %xmm10
7728 ; CHECK-NEXT: addps %xmm3, %xmm7
7729 ; CHECK-NEXT: addps %xmm2, %xmm6
7730 ; CHECK-NEXT: addps %xmm1, %xmm5
7731 ; CHECK-NEXT: addps %xmm0, %xmm4
7732 ; CHECK-NEXT: andps %xmm10, %xmm0
7733 ; CHECK-NEXT: andnps %xmm4, %xmm10
7734 ; CHECK-NEXT: orps %xmm10, %xmm0
7735 ; CHECK-NEXT: andps %xmm11, %xmm1
7736 ; CHECK-NEXT: andnps %xmm5, %xmm11
7737 ; CHECK-NEXT: orps %xmm11, %xmm1
7738 ; CHECK-NEXT: andps %xmm9, %xmm2
7739 ; CHECK-NEXT: andnps %xmm6, %xmm9
7740 ; CHECK-NEXT: orps %xmm9, %xmm2
7741 ; CHECK-NEXT: andps %xmm8, %xmm3
7742 ; CHECK-NEXT: andnps %xmm7, %xmm8
7743 ; CHECK-NEXT: orps %xmm8, %xmm3
7746 ; AVX1-LABEL: vpaddd_mask_test:
7748 ; AVX1-NEXT: vextractf128 $1, %ymm5, %xmm6
7749 ; AVX1-NEXT: vpxor %xmm7, %xmm7, %xmm7
7750 ; AVX1-NEXT: vpcmpeqd %xmm7, %xmm6, %xmm6
7751 ; AVX1-NEXT: vpcmpeqd %xmm7, %xmm5, %xmm5
7752 ; AVX1-NEXT: vinsertf128 $1, %xmm6, %ymm5, %ymm5
7753 ; AVX1-NEXT: vextractf128 $1, %ymm4, %xmm6
7754 ; AVX1-NEXT: vpcmpeqd %xmm7, %xmm6, %xmm6
7755 ; AVX1-NEXT: vpcmpeqd %xmm7, %xmm4, %xmm4
7756 ; AVX1-NEXT: vinsertf128 $1, %xmm6, %ymm4, %ymm4
7757 ; AVX1-NEXT: vaddps %ymm3, %ymm1, %ymm3
7758 ; AVX1-NEXT: vaddps %ymm2, %ymm0, %ymm2
7759 ; AVX1-NEXT: vblendvps %ymm4, %ymm0, %ymm2, %ymm0
7760 ; AVX1-NEXT: vblendvps %ymm5, %ymm1, %ymm3, %ymm1
7763 ; AVX512-LABEL: vpaddd_mask_test:
7765 ; AVX512-NEXT: vptestmd %zmm2, %zmm2, %k1
7766 ; AVX512-NEXT: vaddps %zmm1, %zmm0, %zmm1
7767 ; AVX512-NEXT: vmovaps %zmm1, %zmm0 {%k1}
7769 %mask = icmp ne <16 x i32> %mask1, zeroinitializer
7770 %x = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %i, <16 x float> %j, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
7771 %r = select <16 x i1> %mask, <16 x float> %x, <16 x float> %i
7774 declare <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float>, <16 x float>, metadata, metadata)
7776 attributes #0 = { strictfp }
7778 ; Single width declarations
7779 declare <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7780 declare <2 x double> @llvm.experimental.constrained.fsub.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7781 declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7782 declare <2 x double> @llvm.experimental.constrained.fdiv.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7783 declare <2 x double> @llvm.experimental.constrained.frem.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7784 declare <2 x double> @llvm.experimental.constrained.sqrt.v2f64(<2 x double>, metadata, metadata)
7785 declare <2 x double> @llvm.experimental.constrained.pow.v2f64(<2 x double>, <2 x double>, metadata, metadata)
7786 declare <2 x double> @llvm.experimental.constrained.powi.v2f64(<2 x double>, i32, metadata, metadata)
7787 declare <2 x double> @llvm.experimental.constrained.sin.v2f64(<2 x double>, metadata, metadata)
7788 declare <2 x double> @llvm.experimental.constrained.cos.v2f64(<2 x double>, metadata, metadata)
7789 declare <2 x double> @llvm.experimental.constrained.exp.v2f64(<2 x double>, metadata, metadata)
7790 declare <2 x double> @llvm.experimental.constrained.exp2.v2f64(<2 x double>, metadata, metadata)
7791 declare <2 x double> @llvm.experimental.constrained.log.v2f64(<2 x double>, metadata, metadata)
7792 declare <2 x double> @llvm.experimental.constrained.log10.v2f64(<2 x double>, metadata, metadata)
7793 declare <2 x double> @llvm.experimental.constrained.log2.v2f64(<2 x double>, metadata, metadata)
7794 declare <2 x double> @llvm.experimental.constrained.rint.v2f64(<2 x double>, metadata, metadata)
7795 declare <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(<2 x double>, metadata, metadata)
7796 declare <2 x double> @llvm.experimental.constrained.maxnum.v2f64(<2 x double>, <2 x double>, metadata)
7797 declare <2 x double> @llvm.experimental.constrained.minnum.v2f64(<2 x double>, <2 x double>, metadata)
7798 declare <2 x i32> @llvm.experimental.constrained.fptosi.v2i32.v2f32(<2 x float>, metadata)
7799 declare <2 x i64> @llvm.experimental.constrained.fptosi.v2i64.v2f32(<2 x float>, metadata)
7800 declare <2 x i32> @llvm.experimental.constrained.fptosi.v2i32.v2f64(<2 x double>, metadata)
7801 declare <2 x i64> @llvm.experimental.constrained.fptosi.v2i64.v2f64(<2 x double>, metadata)
7802 declare <2 x i32> @llvm.experimental.constrained.fptoui.v2i32.v2f32(<2 x float>, metadata)
7803 declare <2 x i64> @llvm.experimental.constrained.fptoui.v2i64.v2f32(<2 x float>, metadata)
7804 declare <2 x i32> @llvm.experimental.constrained.fptoui.v2i32.v2f64(<2 x double>, metadata)
7805 declare <2 x i64> @llvm.experimental.constrained.fptoui.v2i64.v2f64(<2 x double>, metadata)
7806 declare <2 x float> @llvm.experimental.constrained.fptrunc.v2f32.v2f64(<2 x double>, metadata, metadata)
7807 declare <2 x double> @llvm.experimental.constrained.fpext.v2f64.v2f32(<2 x float>, metadata)
7808 declare <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>, metadata)
7809 declare <2 x double> @llvm.experimental.constrained.floor.v2f64(<2 x double>, metadata)
7810 declare <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>, metadata)
7811 declare <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>, metadata)
7812 declare <2 x double> @llvm.experimental.constrained.sitofp.v2f64.v2i32(<2 x i32>, metadata, metadata)
7813 declare <2 x float> @llvm.experimental.constrained.sitofp.v2f32.v2i32(<2 x i32>, metadata, metadata)
7814 declare <2 x double> @llvm.experimental.constrained.sitofp.v2f64.v2i64(<2 x i64>, metadata, metadata)
7815 declare <2 x float> @llvm.experimental.constrained.sitofp.v2f32.v2i64(<2 x i64>, metadata, metadata)
7816 declare <2 x double> @llvm.experimental.constrained.uitofp.v2f64.v2i32(<2 x i32>, metadata, metadata)
7817 declare <2 x float> @llvm.experimental.constrained.uitofp.v2f32.v2i32(<2 x i32>, metadata, metadata)
7818 declare <2 x double> @llvm.experimental.constrained.uitofp.v2f64.v2i64(<2 x i64>, metadata, metadata)
7819 declare <2 x float> @llvm.experimental.constrained.uitofp.v2f32.v2i64(<2 x i64>, metadata, metadata)
7821 ; Scalar width declarations
7822 declare <1 x float> @llvm.experimental.constrained.fadd.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7823 declare <1 x float> @llvm.experimental.constrained.fsub.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7824 declare <1 x float> @llvm.experimental.constrained.fmul.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7825 declare <1 x float> @llvm.experimental.constrained.fdiv.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7826 declare <1 x float> @llvm.experimental.constrained.frem.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7827 declare <1 x float> @llvm.experimental.constrained.sqrt.v1f32(<1 x float>, metadata, metadata)
7828 declare <1 x float> @llvm.experimental.constrained.pow.v1f32(<1 x float>, <1 x float>, metadata, metadata)
7829 declare <1 x float> @llvm.experimental.constrained.powi.v1f32(<1 x float>, i32, metadata, metadata)
7830 declare <1 x float> @llvm.experimental.constrained.sin.v1f32(<1 x float>, metadata, metadata)
7831 declare <1 x float> @llvm.experimental.constrained.cos.v1f32(<1 x float>, metadata, metadata)
7832 declare <1 x float> @llvm.experimental.constrained.exp.v1f32(<1 x float>, metadata, metadata)
7833 declare <1 x float> @llvm.experimental.constrained.exp2.v1f32(<1 x float>, metadata, metadata)
7834 declare <1 x float> @llvm.experimental.constrained.log.v1f32(<1 x float>, metadata, metadata)
7835 declare <1 x float> @llvm.experimental.constrained.log10.v1f32(<1 x float>, metadata, metadata)
7836 declare <1 x float> @llvm.experimental.constrained.log2.v1f32(<1 x float>, metadata, metadata)
7837 declare <1 x float> @llvm.experimental.constrained.rint.v1f32(<1 x float>, metadata, metadata)
7838 declare <1 x float> @llvm.experimental.constrained.nearbyint.v1f32(<1 x float>, metadata, metadata)
7839 declare <1 x float> @llvm.experimental.constrained.maxnum.v1f32(<1 x float>, <1 x float>, metadata)
7840 declare <1 x float> @llvm.experimental.constrained.minnum.v1f32(<1 x float>, <1 x float>, metadata)
7841 declare <1 x i32> @llvm.experimental.constrained.fptosi.v1i32.v1f32(<1 x float>, metadata)
7842 declare <1 x i64> @llvm.experimental.constrained.fptosi.v1i64.v1f32(<1 x float>, metadata)
7843 declare <1 x i32> @llvm.experimental.constrained.fptosi.v1i32.v1f64(<1 x double>, metadata)
7844 declare <1 x i64> @llvm.experimental.constrained.fptosi.v1i64.v1f64(<1 x double>, metadata)
7845 declare <1 x i32> @llvm.experimental.constrained.fptoui.v1i32.v1f32(<1 x float>, metadata)
7846 declare <1 x i64> @llvm.experimental.constrained.fptoui.v1i64.v1f32(<1 x float>, metadata)
7847 declare <1 x i32> @llvm.experimental.constrained.fptoui.v1i32.v1f64(<1 x double>, metadata)
7848 declare <1 x i64> @llvm.experimental.constrained.fptoui.v1i64.v1f64(<1 x double>, metadata)
7849 declare <1 x float> @llvm.experimental.constrained.fptrunc.v1f32.v1f64(<1 x double>, metadata, metadata)
7850 declare <1 x double> @llvm.experimental.constrained.fpext.v1f64.v1f32(<1 x float>, metadata)
7851 declare <1 x float> @llvm.experimental.constrained.ceil.v1f32(<1 x float>, metadata)
7852 declare <1 x float> @llvm.experimental.constrained.floor.v1f32(<1 x float>, metadata)
7853 declare <1 x float> @llvm.experimental.constrained.round.v1f32(<1 x float>, metadata)
7854 declare <1 x float> @llvm.experimental.constrained.trunc.v1f32(<1 x float>, metadata)
7855 declare <1 x double> @llvm.experimental.constrained.sitofp.v1f64.v1i32(<1 x i32>, metadata, metadata)
7856 declare <1 x float> @llvm.experimental.constrained.sitofp.v1f32.v1i32(<1 x i32>, metadata, metadata)
7857 declare <1 x double> @llvm.experimental.constrained.sitofp.v1f64.v1i64(<1 x i64>, metadata, metadata)
7858 declare <1 x float> @llvm.experimental.constrained.sitofp.v1f32.v1i64(<1 x i64>, metadata, metadata)
7859 declare <1 x double> @llvm.experimental.constrained.uitofp.v1f64.v1i32(<1 x i32>, metadata, metadata)
7860 declare <1 x float> @llvm.experimental.constrained.uitofp.v1f32.v1i32(<1 x i32>, metadata, metadata)
7861 declare <1 x double> @llvm.experimental.constrained.uitofp.v1f64.v1i64(<1 x i64>, metadata, metadata)
7862 declare <1 x float> @llvm.experimental.constrained.uitofp.v1f32.v1i64(<1 x i64>, metadata, metadata)
7864 ; Illegal width declarations
7865 declare <3 x float> @llvm.experimental.constrained.fadd.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7866 declare <3 x double> @llvm.experimental.constrained.fadd.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7867 declare <3 x float> @llvm.experimental.constrained.fsub.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7868 declare <3 x double> @llvm.experimental.constrained.fsub.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7869 declare <3 x float> @llvm.experimental.constrained.fmul.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7870 declare <3 x double> @llvm.experimental.constrained.fmul.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7871 declare <3 x float> @llvm.experimental.constrained.fdiv.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7872 declare <3 x double> @llvm.experimental.constrained.fdiv.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7873 declare <3 x float> @llvm.experimental.constrained.frem.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7874 declare <3 x double> @llvm.experimental.constrained.frem.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7875 declare <3 x float> @llvm.experimental.constrained.sqrt.v3f32(<3 x float>, metadata, metadata)
7876 declare <3 x double> @llvm.experimental.constrained.sqrt.v3f64(<3 x double>, metadata, metadata)
7877 declare <3 x float> @llvm.experimental.constrained.pow.v3f32(<3 x float>, <3 x float>, metadata, metadata)
7878 declare <3 x double> @llvm.experimental.constrained.pow.v3f64(<3 x double>, <3 x double>, metadata, metadata)
7879 declare <3 x float> @llvm.experimental.constrained.powi.v3f32(<3 x float>, i32, metadata, metadata)
7880 declare <3 x double> @llvm.experimental.constrained.powi.v3f64(<3 x double>, i32, metadata, metadata)
7881 declare <3 x float> @llvm.experimental.constrained.sin.v3f32(<3 x float>, metadata, metadata)
7882 declare <3 x double> @llvm.experimental.constrained.sin.v3f64(<3 x double>, metadata, metadata)
7883 declare <3 x float> @llvm.experimental.constrained.cos.v3f32(<3 x float>, metadata, metadata)
7884 declare <3 x double> @llvm.experimental.constrained.cos.v3f64(<3 x double>, metadata, metadata)
7885 declare <3 x float> @llvm.experimental.constrained.exp.v3f32(<3 x float>, metadata, metadata)
7886 declare <3 x double> @llvm.experimental.constrained.exp.v3f64(<3 x double>, metadata, metadata)
7887 declare <3 x float> @llvm.experimental.constrained.exp2.v3f32(<3 x float>, metadata, metadata)
7888 declare <3 x double> @llvm.experimental.constrained.exp2.v3f64(<3 x double>, metadata, metadata)
7889 declare <3 x float> @llvm.experimental.constrained.log.v3f32(<3 x float>, metadata, metadata)
7890 declare <3 x double> @llvm.experimental.constrained.log.v3f64(<3 x double>, metadata, metadata)
7891 declare <3 x float> @llvm.experimental.constrained.log10.v3f32(<3 x float>, metadata, metadata)
7892 declare <3 x double> @llvm.experimental.constrained.log10.v3f64(<3 x double>, metadata, metadata)
7893 declare <3 x float> @llvm.experimental.constrained.log2.v3f32(<3 x float>, metadata, metadata)
7894 declare <3 x double> @llvm.experimental.constrained.log2.v3f64(<3 x double>, metadata, metadata)
7895 declare <3 x float> @llvm.experimental.constrained.rint.v3f32(<3 x float>, metadata, metadata)
7896 declare <3 x double> @llvm.experimental.constrained.rint.v3f64(<3 x double>, metadata, metadata)
7897 declare <3 x float> @llvm.experimental.constrained.nearbyint.v3f32(<3 x float>, metadata, metadata)
7898 declare <3 x double> @llvm.experimental.constrained.nearbyint.v3f64(<3 x double>, metadata, metadata)
7899 declare <3 x float> @llvm.experimental.constrained.maxnum.v3f32(<3 x float>, <3 x float>, metadata)
7900 declare <3 x double> @llvm.experimental.constrained.maxnum.v3f64(<3 x double>, <3 x double>, metadata)
7901 declare <3 x float> @llvm.experimental.constrained.minnum.v3f32(<3 x float>, <3 x float>, metadata)
7902 declare <3 x double> @llvm.experimental.constrained.minnum.v3f64(<3 x double>, <3 x double>, metadata)
7903 declare <3 x i32> @llvm.experimental.constrained.fptosi.v3i32.v3f32(<3 x float>, metadata)
7904 declare <3 x i64> @llvm.experimental.constrained.fptosi.v3i64.v3f32(<3 x float>, metadata)
7905 declare <3 x i32> @llvm.experimental.constrained.fptosi.v3i32.v3f64(<3 x double>, metadata)
7906 declare <3 x i64> @llvm.experimental.constrained.fptosi.v3i64.v3f64(<3 x double>, metadata)
7907 declare <3 x i32> @llvm.experimental.constrained.fptoui.v3i32.v3f32(<3 x float>, metadata)
7908 declare <3 x i64> @llvm.experimental.constrained.fptoui.v3i64.v3f32(<3 x float>, metadata)
7909 declare <3 x i32> @llvm.experimental.constrained.fptoui.v3i32.v3f64(<3 x double>, metadata)
7910 declare <3 x i64> @llvm.experimental.constrained.fptoui.v3i64.v3f64(<3 x double>, metadata)
7911 declare <3 x float> @llvm.experimental.constrained.fptrunc.v3f32.v3f64(<3 x double>, metadata, metadata)
7912 declare <3 x double> @llvm.experimental.constrained.fpext.v3f64.v3f32(<3 x float>, metadata)
7913 declare <3 x float> @llvm.experimental.constrained.ceil.v3f32(<3 x float>, metadata)
7914 declare <3 x double> @llvm.experimental.constrained.ceil.v3f64(<3 x double>, metadata)
7915 declare <3 x float> @llvm.experimental.constrained.floor.v3f32(<3 x float>, metadata)
7916 declare <3 x double> @llvm.experimental.constrained.floor.v3f64(<3 x double>, metadata)
7917 declare <3 x float> @llvm.experimental.constrained.round.v3f32(<3 x float>, metadata)
7918 declare <3 x double> @llvm.experimental.constrained.round.v3f64(<3 x double>, metadata)
7919 declare <3 x float> @llvm.experimental.constrained.trunc.v3f32(<3 x float>, metadata)
7920 declare <3 x double> @llvm.experimental.constrained.trunc.v3f64(<3 x double>, metadata)
7921 declare <3 x double> @llvm.experimental.constrained.sitofp.v3f64.v3i32(<3 x i32>, metadata, metadata)
7922 declare <3 x float> @llvm.experimental.constrained.sitofp.v3f32.v3i32(<3 x i32>, metadata, metadata)
7923 declare <3 x double> @llvm.experimental.constrained.sitofp.v3f64.v3i64(<3 x i64>, metadata, metadata)
7924 declare <3 x float> @llvm.experimental.constrained.sitofp.v3f32.v3i64(<3 x i64>, metadata, metadata)
7925 declare <3 x double> @llvm.experimental.constrained.uitofp.v3f64.v3i32(<3 x i32>, metadata, metadata)
7926 declare <3 x float> @llvm.experimental.constrained.uitofp.v3f32.v3i32(<3 x i32>, metadata, metadata)
7927 declare <3 x double> @llvm.experimental.constrained.uitofp.v3f64.v3i64(<3 x i64>, metadata, metadata)
7928 declare <3 x float> @llvm.experimental.constrained.uitofp.v3f32.v3i64(<3 x i64>, metadata, metadata)
7930 ; Double width declarations
7931 declare <4 x double> @llvm.experimental.constrained.fadd.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7932 declare <4 x double> @llvm.experimental.constrained.fsub.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7933 declare <4 x double> @llvm.experimental.constrained.fmul.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7934 declare <4 x double> @llvm.experimental.constrained.fdiv.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7935 declare <4 x double> @llvm.experimental.constrained.frem.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7936 declare <4 x double> @llvm.experimental.constrained.sqrt.v4f64(<4 x double>, metadata, metadata)
7937 declare <4 x double> @llvm.experimental.constrained.pow.v4f64(<4 x double>, <4 x double>, metadata, metadata)
7938 declare <4 x double> @llvm.experimental.constrained.powi.v4f64(<4 x double>, i32, metadata, metadata)
7939 declare <4 x double> @llvm.experimental.constrained.sin.v4f64(<4 x double>, metadata, metadata)
7940 declare <4 x double> @llvm.experimental.constrained.cos.v4f64(<4 x double>, metadata, metadata)
7941 declare <4 x double> @llvm.experimental.constrained.exp.v4f64(<4 x double>, metadata, metadata)
7942 declare <4 x double> @llvm.experimental.constrained.exp2.v4f64(<4 x double>, metadata, metadata)
7943 declare <4 x double> @llvm.experimental.constrained.log.v4f64(<4 x double>, metadata, metadata)
7944 declare <4 x double> @llvm.experimental.constrained.log10.v4f64(<4 x double>, metadata, metadata)
7945 declare <4 x double> @llvm.experimental.constrained.log2.v4f64(<4 x double>, metadata, metadata)
7946 declare <4 x double> @llvm.experimental.constrained.rint.v4f64(<4 x double>, metadata, metadata)
7947 declare <4 x double> @llvm.experimental.constrained.nearbyint.v4f64(<4 x double>, metadata, metadata)
7948 declare <4 x double> @llvm.experimental.constrained.maxnum.v4f64(<4 x double>, <4 x double>, metadata)
7949 declare <4 x double> @llvm.experimental.constrained.minnum.v4f64(<4 x double>, <4 x double>, metadata)
7950 declare <4 x i32> @llvm.experimental.constrained.fptosi.v4i32.v4f32(<4 x float>, metadata)
7951 declare <4 x i64> @llvm.experimental.constrained.fptosi.v4i64.v4f32(<4 x float>, metadata)
7952 declare <4 x i32> @llvm.experimental.constrained.fptosi.v4i32.v4f64(<4 x double>, metadata)
7953 declare <4 x i64> @llvm.experimental.constrained.fptosi.v4i64.v4f64(<4 x double>, metadata)
7954 declare <4 x i32> @llvm.experimental.constrained.fptoui.v4i32.v4f32(<4 x float>, metadata)
7955 declare <4 x i64> @llvm.experimental.constrained.fptoui.v4i64.v4f32(<4 x float>, metadata)
7956 declare <4 x i32> @llvm.experimental.constrained.fptoui.v4i32.v4f64(<4 x double>, metadata)
7957 declare <4 x i64> @llvm.experimental.constrained.fptoui.v4i64.v4f64(<4 x double>, metadata)
7958 declare <4 x float> @llvm.experimental.constrained.fptrunc.v4f32.v4f64(<4 x double>, metadata, metadata)
7959 declare <4 x double> @llvm.experimental.constrained.fpext.v4f64.v4f32(<4 x float>, metadata)
7960 declare <4 x double> @llvm.experimental.constrained.ceil.v4f64(<4 x double>, metadata)
7961 declare <4 x double> @llvm.experimental.constrained.floor.v4f64(<4 x double>, metadata)
7962 declare <4 x double> @llvm.experimental.constrained.round.v4f64(<4 x double>, metadata)
7963 declare <4 x double> @llvm.experimental.constrained.trunc.v4f64(<4 x double>, metadata)
7964 declare <4 x double> @llvm.experimental.constrained.sitofp.v4f64.v4i32(<4 x i32>, metadata, metadata)
7965 declare <4 x float> @llvm.experimental.constrained.sitofp.v4f32.v4i32(<4 x i32>, metadata, metadata)
7966 declare <4 x double> @llvm.experimental.constrained.sitofp.v4f64.v4i64(<4 x i64>, metadata, metadata)
7967 declare <4 x float> @llvm.experimental.constrained.sitofp.v4f32.v4i64(<4 x i64>, metadata, metadata)
7968 declare <4 x double> @llvm.experimental.constrained.uitofp.v4f64.v4i32(<4 x i32>, metadata, metadata)
7969 declare <4 x float> @llvm.experimental.constrained.uitofp.v4f32.v4i32(<4 x i32>, metadata, metadata)
7970 declare <4 x double> @llvm.experimental.constrained.uitofp.v4f64.v4i64(<4 x i64>, metadata, metadata)
7971 declare <4 x float> @llvm.experimental.constrained.uitofp.v4f32.v4i64(<4 x i64>, metadata, metadata)