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
4 define <1 x float> @constrained_vector_fdiv_v1f32() {
5 ; CHECK-LABEL: constrained_vector_fdiv_v1f32:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
8 ; CHECK-NEXT: divss {{.*}}(%rip), %xmm0
11 %div = call <1 x float> @llvm.experimental.constrained.fdiv.v1f32(
12 <1 x float> <float 1.000000e+00>,
13 <1 x float> <float 1.000000e+01>,
14 metadata !"round.dynamic",
15 metadata !"fpexcept.strict")
19 define <2 x double> @constrained_vector_fdiv_v2f64() {
20 ; CHECK-LABEL: constrained_vector_fdiv_v2f64:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
23 ; CHECK-NEXT: divpd {{.*}}(%rip), %xmm0
26 %div = call <2 x double> @llvm.experimental.constrained.fdiv.v2f64(
27 <2 x double> <double 1.000000e+00, double 2.000000e+00>,
28 <2 x double> <double 1.000000e+01, double 1.000000e+01>,
29 metadata !"round.dynamic",
30 metadata !"fpexcept.strict")
34 define <3 x float> @constrained_vector_fdiv_v3f32() {
35 ; CHECK-LABEL: constrained_vector_fdiv_v3f32:
36 ; CHECK: # %bb.0: # %entry
37 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
38 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
39 ; CHECK-NEXT: divss %xmm1, %xmm2
40 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
41 ; CHECK-NEXT: divss %xmm1, %xmm0
42 ; CHECK-NEXT: movss {{.*#+}} xmm3 = mem[0],zero,zero,zero
43 ; CHECK-NEXT: divss %xmm1, %xmm3
44 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
45 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
48 %div = call <3 x float> @llvm.experimental.constrained.fdiv.v3f32(
49 <3 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>,
50 <3 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>,
51 metadata !"round.dynamic",
52 metadata !"fpexcept.strict")
56 define <3 x double> @constrained_vector_fdiv_v3f64() {
57 ; CHECK-LABEL: constrained_vector_fdiv_v3f64:
58 ; CHECK: # %bb.0: # %entry
59 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
60 ; CHECK-NEXT: divpd {{.*}}(%rip), %xmm0
61 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
62 ; CHECK-NEXT: divsd {{.*}}(%rip), %xmm1
63 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
64 ; CHECK-NEXT: movapd %xmm0, %xmm1
65 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
66 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
69 %div = call <3 x double> @llvm.experimental.constrained.fdiv.v3f64(
70 <3 x double> <double 1.000000e+00, double 2.000000e+00, double 3.000000e+00>,
71 <3 x double> <double 1.000000e+01, double 1.000000e+01, double 1.000000e+01>,
72 metadata !"round.dynamic",
73 metadata !"fpexcept.strict")
77 define <4 x double> @constrained_vector_fdiv_v4f64() {
78 ; CHECK-LABEL: constrained_vector_fdiv_v4f64:
79 ; CHECK: # %bb.0: # %entry
80 ; CHECK-NEXT: movapd {{.*#+}} xmm2 = [1.0E+1,1.0E+1]
81 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,2.0E+0]
82 ; CHECK-NEXT: divpd %xmm2, %xmm0
83 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [3.0E+0,4.0E+0]
84 ; CHECK-NEXT: divpd %xmm2, %xmm1
87 %div = call <4 x double> @llvm.experimental.constrained.fdiv.v4f64(
88 <4 x double> <double 1.000000e+00, double 2.000000e+00,
89 double 3.000000e+00, double 4.000000e+00>,
90 <4 x double> <double 1.000000e+01, double 1.000000e+01,
91 double 1.000000e+01, double 1.000000e+01>,
92 metadata !"round.dynamic",
93 metadata !"fpexcept.strict")
97 define <1 x float> @constrained_vector_frem_v1f32() {
98 ; CHECK-LABEL: constrained_vector_frem_v1f32:
99 ; CHECK: # %bb.0: # %entry
100 ; CHECK-NEXT: pushq %rax
101 ; CHECK-NEXT: .cfi_def_cfa_offset 16
102 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
103 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
104 ; CHECK-NEXT: callq fmodf
105 ; CHECK-NEXT: popq %rax
106 ; CHECK-NEXT: .cfi_def_cfa_offset 8
109 %rem = call <1 x float> @llvm.experimental.constrained.frem.v1f32(
110 <1 x float> <float 1.000000e+00>,
111 <1 x float> <float 1.000000e+01>,
112 metadata !"round.dynamic",
113 metadata !"fpexcept.strict")
117 define <2 x double> @constrained_vector_frem_v2f64() {
118 ; CHECK-LABEL: constrained_vector_frem_v2f64:
119 ; CHECK: # %bb.0: # %entry
120 ; CHECK-NEXT: subq $24, %rsp
121 ; CHECK-NEXT: .cfi_def_cfa_offset 32
122 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
123 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
124 ; CHECK-NEXT: callq fmod
125 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
126 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
127 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
128 ; CHECK-NEXT: callq fmod
129 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
130 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
131 ; CHECK-NEXT: addq $24, %rsp
132 ; CHECK-NEXT: .cfi_def_cfa_offset 8
135 %rem = call <2 x double> @llvm.experimental.constrained.frem.v2f64(
136 <2 x double> <double 1.000000e+00, double 2.000000e+00>,
137 <2 x double> <double 1.000000e+01, double 1.000000e+01>,
138 metadata !"round.dynamic",
139 metadata !"fpexcept.strict")
140 ret <2 x double> %rem
143 define <3 x float> @constrained_vector_frem_v3f32() {
144 ; CHECK-LABEL: constrained_vector_frem_v3f32:
145 ; CHECK: # %bb.0: # %entry
146 ; CHECK-NEXT: subq $40, %rsp
147 ; CHECK-NEXT: .cfi_def_cfa_offset 48
148 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
149 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
150 ; CHECK-NEXT: callq fmodf
151 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
152 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
153 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
154 ; CHECK-NEXT: callq fmodf
155 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
156 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
157 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
158 ; CHECK-NEXT: callq fmodf
159 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
160 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
161 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
162 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
163 ; CHECK-NEXT: movaps %xmm1, %xmm0
164 ; CHECK-NEXT: addq $40, %rsp
165 ; CHECK-NEXT: .cfi_def_cfa_offset 8
168 %rem = call <3 x float> @llvm.experimental.constrained.frem.v3f32(
169 <3 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>,
170 <3 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>,
171 metadata !"round.dynamic",
172 metadata !"fpexcept.strict")
176 define <3 x double> @constrained_vector_frem_v3f64() {
177 ; CHECK-LABEL: constrained_vector_frem_v3f64:
178 ; CHECK: # %bb.0: # %entry
179 ; CHECK-NEXT: subq $24, %rsp
180 ; CHECK-NEXT: .cfi_def_cfa_offset 32
181 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
182 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
183 ; CHECK-NEXT: callq fmod
184 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
185 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
186 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
187 ; CHECK-NEXT: callq fmod
188 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
189 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
190 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
191 ; CHECK-NEXT: callq fmod
192 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
193 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
194 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
195 ; CHECK-NEXT: # xmm0 = mem[0],zero
196 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
197 ; CHECK-NEXT: # xmm1 = mem[0],zero
198 ; CHECK-NEXT: addq $24, %rsp
199 ; CHECK-NEXT: .cfi_def_cfa_offset 8
202 %rem = call <3 x double> @llvm.experimental.constrained.frem.v3f64(
203 <3 x double> <double 1.000000e+00, double 2.000000e+00, double 3.000000e+00>,
204 <3 x double> <double 1.000000e+01, double 1.000000e+01, double 1.000000e+01>,
205 metadata !"round.dynamic",
206 metadata !"fpexcept.strict")
207 ret <3 x double> %rem
210 define <4 x double> @constrained_vector_frem_v4f64() {
211 ; CHECK-LABEL: constrained_vector_frem_v4f64:
213 ; CHECK-NEXT: subq $40, %rsp
214 ; CHECK-NEXT: .cfi_def_cfa_offset 48
215 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
216 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
217 ; CHECK-NEXT: callq fmod
218 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
219 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
220 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
221 ; CHECK-NEXT: callq fmod
222 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
223 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
224 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
225 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
226 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
227 ; CHECK-NEXT: callq fmod
228 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
229 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
230 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
231 ; CHECK-NEXT: callq fmod
232 ; CHECK-NEXT: movaps %xmm0, %xmm1
233 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
234 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
235 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
236 ; CHECK-NEXT: addq $40, %rsp
237 ; CHECK-NEXT: .cfi_def_cfa_offset 8
239 %rem = call <4 x double> @llvm.experimental.constrained.frem.v4f64(
240 <4 x double> <double 1.000000e+00, double 2.000000e+00,
241 double 3.000000e+00, double 4.000000e+00>,
242 <4 x double> <double 1.000000e+01, double 1.000000e+01,
243 double 1.000000e+01, double 1.000000e+01>,
244 metadata !"round.dynamic",
245 metadata !"fpexcept.strict")
246 ret <4 x double> %rem
249 define <1 x float> @constrained_vector_fmul_v1f32() {
250 ; CHECK-LABEL: constrained_vector_fmul_v1f32:
251 ; CHECK: # %bb.0: # %entry
252 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
253 ; CHECK-NEXT: mulss {{.*}}(%rip), %xmm0
256 %mul = call <1 x float> @llvm.experimental.constrained.fmul.v1f32(
257 <1 x float> <float 0x7FF0000000000000>,
258 <1 x float> <float 2.000000e+00>,
259 metadata !"round.dynamic",
260 metadata !"fpexcept.strict")
264 define <2 x double> @constrained_vector_fmul_v2f64() {
265 ; CHECK-LABEL: constrained_vector_fmul_v2f64:
266 ; CHECK: # %bb.0: # %entry
267 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
268 ; CHECK-NEXT: mulpd {{.*}}(%rip), %xmm0
271 %mul = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(
272 <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
273 <2 x double> <double 2.000000e+00, double 3.000000e+00>,
274 metadata !"round.dynamic",
275 metadata !"fpexcept.strict")
276 ret <2 x double> %mul
279 define <3 x float> @constrained_vector_fmul_v3f32() {
280 ; CHECK-LABEL: constrained_vector_fmul_v3f32:
281 ; CHECK: # %bb.0: # %entry
282 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
283 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
284 ; CHECK-NEXT: mulss %xmm1, %xmm2
285 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
286 ; CHECK-NEXT: mulss %xmm1, %xmm0
287 ; CHECK-NEXT: mulss {{.*}}(%rip), %xmm1
288 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
289 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
292 %mul = call <3 x float> @llvm.experimental.constrained.fmul.v3f32(
293 <3 x float> <float 0x7FF0000000000000, float 0x7FF0000000000000,
294 float 0x7FF0000000000000>,
295 <3 x float> <float 1.000000e+00, float 1.000000e+01, float 1.000000e+02>,
296 metadata !"round.dynamic",
297 metadata !"fpexcept.strict")
301 define <3 x double> @constrained_vector_fmul_v3f64() {
302 ; CHECK-LABEL: constrained_vector_fmul_v3f64:
303 ; CHECK: # %bb.0: # %entry
304 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
305 ; CHECK-NEXT: mulpd {{.*}}(%rip), %xmm0
306 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
307 ; CHECK-NEXT: mulsd {{.*}}(%rip), %xmm1
308 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
309 ; CHECK-NEXT: movapd %xmm0, %xmm1
310 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
311 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
314 %mul = call <3 x double> @llvm.experimental.constrained.fmul.v3f64(
315 <3 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
316 double 0x7FEFFFFFFFFFFFFF>,
317 <3 x double> <double 1.000000e+00, double 1.000000e+01, double 1.000000e+02>,
318 metadata !"round.dynamic",
319 metadata !"fpexcept.strict")
320 ret <3 x double> %mul
323 define <4 x double> @constrained_vector_fmul_v4f64() {
324 ; CHECK-LABEL: constrained_vector_fmul_v4f64:
325 ; CHECK: # %bb.0: # %entry
326 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [1.7976931348623157E+308,1.7976931348623157E+308]
327 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [2.0E+0,3.0E+0]
328 ; CHECK-NEXT: mulpd %xmm1, %xmm0
329 ; CHECK-NEXT: mulpd {{.*}}(%rip), %xmm1
332 %mul = call <4 x double> @llvm.experimental.constrained.fmul.v4f64(
333 <4 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
334 double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
335 <4 x double> <double 2.000000e+00, double 3.000000e+00,
336 double 4.000000e+00, double 5.000000e+00>,
337 metadata !"round.dynamic",
338 metadata !"fpexcept.strict")
339 ret <4 x double> %mul
342 define <1 x float> @constrained_vector_fadd_v1f32() {
343 ; CHECK-LABEL: constrained_vector_fadd_v1f32:
344 ; CHECK: # %bb.0: # %entry
345 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
346 ; CHECK-NEXT: addss {{.*}}(%rip), %xmm0
349 %add = call <1 x float> @llvm.experimental.constrained.fadd.v1f32(
350 <1 x float> <float 0x7FF0000000000000>,
351 <1 x float> <float 1.0>,
352 metadata !"round.dynamic",
353 metadata !"fpexcept.strict")
357 define <2 x double> @constrained_vector_fadd_v2f64() {
358 ; CHECK-LABEL: constrained_vector_fadd_v2f64:
359 ; CHECK: # %bb.0: # %entry
360 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
361 ; CHECK-NEXT: addpd {{.*}}(%rip), %xmm0
364 %add = call <2 x double> @llvm.experimental.constrained.fadd.v2f64(
365 <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
366 <2 x double> <double 1.000000e+00, double 1.000000e-01>,
367 metadata !"round.dynamic",
368 metadata !"fpexcept.strict")
369 ret <2 x double> %add
372 define <3 x float> @constrained_vector_fadd_v3f32() {
373 ; CHECK-LABEL: constrained_vector_fadd_v3f32:
374 ; CHECK: # %bb.0: # %entry
375 ; CHECK-NEXT: xorps %xmm1, %xmm1
376 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
377 ; CHECK-NEXT: addss %xmm2, %xmm1
378 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
379 ; CHECK-NEXT: addss %xmm2, %xmm0
380 ; CHECK-NEXT: addss {{.*}}(%rip), %xmm2
381 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
382 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
385 %add = call <3 x float> @llvm.experimental.constrained.fadd.v3f32(
386 <3 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000,
387 float 0xFFFFFFFFE0000000>,
388 <3 x float> <float 2.0, float 1.0, float 0.0>,
389 metadata !"round.dynamic",
390 metadata !"fpexcept.strict")
394 define <3 x double> @constrained_vector_fadd_v3f64() {
395 ; CHECK-LABEL: constrained_vector_fadd_v3f64:
396 ; CHECK: # %bb.0: # %entry
397 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.7976931348623157E+308,1.7976931348623157E+308]
398 ; CHECK-NEXT: addpd {{.*}}(%rip), %xmm0
399 ; CHECK-NEXT: xorpd %xmm1, %xmm1
400 ; CHECK-NEXT: addsd {{.*}}(%rip), %xmm1
401 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
402 ; CHECK-NEXT: movapd %xmm0, %xmm1
403 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
404 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
407 %add = call <3 x double> @llvm.experimental.constrained.fadd.v3f64(
408 <3 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
409 double 0x7FEFFFFFFFFFFFFF>,
410 <3 x double> <double 2.0, double 1.0, double 0.0>,
411 metadata !"round.dynamic",
412 metadata !"fpexcept.strict")
413 ret <3 x double> %add
416 define <4 x double> @constrained_vector_fadd_v4f64() {
417 ; CHECK-LABEL: constrained_vector_fadd_v4f64:
418 ; CHECK: # %bb.0: # %entry
419 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [1.7976931348623157E+308,1.7976931348623157E+308]
420 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [1.0E+0,1.0000000000000001E-1]
421 ; CHECK-NEXT: addpd %xmm1, %xmm0
422 ; CHECK-NEXT: addpd {{.*}}(%rip), %xmm1
425 %add = call <4 x double> @llvm.experimental.constrained.fadd.v4f64(
426 <4 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF,
427 double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>,
428 <4 x double> <double 1.000000e+00, double 1.000000e-01,
429 double 2.000000e+00, double 2.000000e-01>,
430 metadata !"round.dynamic",
431 metadata !"fpexcept.strict")
432 ret <4 x double> %add
435 define <1 x float> @constrained_vector_fsub_v1f32() {
436 ; CHECK-LABEL: constrained_vector_fsub_v1f32:
437 ; CHECK: # %bb.0: # %entry
438 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
439 ; CHECK-NEXT: subss {{.*}}(%rip), %xmm0
442 %sub = call <1 x float> @llvm.experimental.constrained.fsub.v1f32(
443 <1 x float> <float 0x7FF0000000000000>,
444 <1 x float> <float 1.000000e+00>,
445 metadata !"round.dynamic",
446 metadata !"fpexcept.strict")
450 define <2 x double> @constrained_vector_fsub_v2f64() {
451 ; CHECK-LABEL: constrained_vector_fsub_v2f64:
452 ; CHECK: # %bb.0: # %entry
453 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
454 ; CHECK-NEXT: subpd {{.*}}(%rip), %xmm0
457 %sub = call <2 x double> @llvm.experimental.constrained.fsub.v2f64(
458 <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>,
459 <2 x double> <double 1.000000e+00, double 1.000000e-01>,
460 metadata !"round.dynamic",
461 metadata !"fpexcept.strict")
462 ret <2 x double> %sub
465 define <3 x float> @constrained_vector_fsub_v3f32() {
466 ; CHECK-LABEL: constrained_vector_fsub_v3f32:
467 ; CHECK: # %bb.0: # %entry
468 ; CHECK-NEXT: xorps %xmm0, %xmm0
469 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
470 ; CHECK-NEXT: movaps %xmm1, %xmm2
471 ; CHECK-NEXT: subss %xmm0, %xmm2
472 ; CHECK-NEXT: movaps %xmm1, %xmm0
473 ; CHECK-NEXT: subss {{.*}}(%rip), %xmm0
474 ; CHECK-NEXT: subss {{.*}}(%rip), %xmm1
475 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
476 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
479 %sub = call <3 x float> @llvm.experimental.constrained.fsub.v3f32(
480 <3 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000,
481 float 0xFFFFFFFFE0000000>,
482 <3 x float> <float 2.0, float 1.0, float 0.0>,
483 metadata !"round.dynamic",
484 metadata !"fpexcept.strict")
488 define <3 x double> @constrained_vector_fsub_v3f64() {
489 ; CHECK-LABEL: constrained_vector_fsub_v3f64:
490 ; CHECK: # %bb.0: # %entry
491 ; CHECK-NEXT: xorpd %xmm0, %xmm0
492 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
493 ; CHECK-NEXT: subsd %xmm0, %xmm1
494 ; CHECK-NEXT: movapd {{.*#+}} xmm0 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
495 ; CHECK-NEXT: subpd {{.*}}(%rip), %xmm0
496 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
497 ; CHECK-NEXT: movapd %xmm0, %xmm1
498 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
499 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
502 %sub = call <3 x double> @llvm.experimental.constrained.fsub.v3f64(
503 <3 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF,
504 double 0xFFEFFFFFFFFFFFFF>,
505 <3 x double> <double 2.0, double 1.0, double 0.0>,
506 metadata !"round.dynamic",
507 metadata !"fpexcept.strict")
508 ret <3 x double> %sub
511 define <4 x double> @constrained_vector_fsub_v4f64() {
512 ; CHECK-LABEL: constrained_vector_fsub_v4f64:
513 ; CHECK: # %bb.0: # %entry
514 ; CHECK-NEXT: movapd {{.*#+}} xmm1 = [-1.7976931348623157E+308,-1.7976931348623157E+308]
515 ; CHECK-NEXT: movapd %xmm1, %xmm0
516 ; CHECK-NEXT: subpd {{.*}}(%rip), %xmm0
517 ; CHECK-NEXT: subpd {{.*}}(%rip), %xmm1
520 %sub = call <4 x double> @llvm.experimental.constrained.fsub.v4f64(
521 <4 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF,
522 double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>,
523 <4 x double> <double 1.000000e+00, double 1.000000e-01,
524 double 2.000000e+00, double 2.000000e-01>,
525 metadata !"round.dynamic",
526 metadata !"fpexcept.strict")
527 ret <4 x double> %sub
530 define <1 x float> @constrained_vector_sqrt_v1f32() {
531 ; CHECK-LABEL: constrained_vector_sqrt_v1f32:
532 ; CHECK: # %bb.0: # %entry
533 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
534 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
537 %sqrt = call <1 x float> @llvm.experimental.constrained.sqrt.v1f32(
538 <1 x float> <float 42.0>,
539 metadata !"round.dynamic",
540 metadata !"fpexcept.strict")
541 ret <1 x float> %sqrt
544 define <2 x double> @constrained_vector_sqrt_v2f64() {
545 ; CHECK-LABEL: constrained_vector_sqrt_v2f64:
546 ; CHECK: # %bb.0: # %entry
547 ; CHECK-NEXT: sqrtpd {{.*}}(%rip), %xmm0
550 %sqrt = call <2 x double> @llvm.experimental.constrained.sqrt.v2f64(
551 <2 x double> <double 42.0, double 42.1>,
552 metadata !"round.dynamic",
553 metadata !"fpexcept.strict")
554 ret <2 x double> %sqrt
557 define <3 x float> @constrained_vector_sqrt_v3f32() {
558 ; CHECK-LABEL: constrained_vector_sqrt_v3f32:
559 ; CHECK: # %bb.0: # %entry
560 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
561 ; CHECK-NEXT: sqrtss %xmm0, %xmm1
562 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
563 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
564 ; CHECK-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
565 ; CHECK-NEXT: sqrtss %xmm2, %xmm2
566 ; CHECK-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
567 ; CHECK-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
570 %sqrt = call <3 x float> @llvm.experimental.constrained.sqrt.v3f32(
571 <3 x float> <float 42.0, float 43.0, float 44.0>,
572 metadata !"round.dynamic",
573 metadata !"fpexcept.strict")
574 ret <3 x float> %sqrt
577 define <3 x double> @constrained_vector_sqrt_v3f64() {
578 ; CHECK-LABEL: constrained_vector_sqrt_v3f64:
579 ; CHECK: # %bb.0: # %entry
580 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
581 ; CHECK-NEXT: sqrtsd %xmm0, %xmm1
582 ; CHECK-NEXT: sqrtpd {{.*}}(%rip), %xmm0
583 ; CHECK-NEXT: movsd %xmm1, -{{[0-9]+}}(%rsp)
584 ; CHECK-NEXT: movapd %xmm0, %xmm1
585 ; CHECK-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
586 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
589 %sqrt = call <3 x double> @llvm.experimental.constrained.sqrt.v3f64(
590 <3 x double> <double 42.0, double 42.1, double 42.2>,
591 metadata !"round.dynamic",
592 metadata !"fpexcept.strict")
593 ret <3 x double> %sqrt
596 define <4 x double> @constrained_vector_sqrt_v4f64() {
597 ; CHECK-LABEL: constrained_vector_sqrt_v4f64:
598 ; CHECK: # %bb.0: # %entry
599 ; CHECK-NEXT: sqrtpd {{.*}}(%rip), %xmm0
600 ; CHECK-NEXT: sqrtpd {{.*}}(%rip), %xmm1
603 %sqrt = call <4 x double> @llvm.experimental.constrained.sqrt.v4f64(
604 <4 x double> <double 42.0, double 42.1,
605 double 42.2, double 42.3>,
606 metadata !"round.dynamic",
607 metadata !"fpexcept.strict")
608 ret <4 x double> %sqrt
611 define <1 x float> @constrained_vector_pow_v1f32() {
612 ; CHECK-LABEL: constrained_vector_pow_v1f32:
613 ; CHECK: # %bb.0: # %entry
614 ; CHECK-NEXT: pushq %rax
615 ; CHECK-NEXT: .cfi_def_cfa_offset 16
616 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
617 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
618 ; CHECK-NEXT: callq powf
619 ; CHECK-NEXT: popq %rax
620 ; CHECK-NEXT: .cfi_def_cfa_offset 8
623 %pow = call <1 x float> @llvm.experimental.constrained.pow.v1f32(
624 <1 x float> <float 42.0>,
625 <1 x float> <float 3.0>,
626 metadata !"round.dynamic",
627 metadata !"fpexcept.strict")
631 define <2 x double> @constrained_vector_pow_v2f64() {
632 ; CHECK-LABEL: constrained_vector_pow_v2f64:
633 ; CHECK: # %bb.0: # %entry
634 ; CHECK-NEXT: subq $24, %rsp
635 ; CHECK-NEXT: .cfi_def_cfa_offset 32
636 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
637 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
638 ; CHECK-NEXT: callq pow
639 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
640 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
641 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
642 ; CHECK-NEXT: callq pow
643 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
644 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
645 ; CHECK-NEXT: addq $24, %rsp
646 ; CHECK-NEXT: .cfi_def_cfa_offset 8
649 %pow = call <2 x double> @llvm.experimental.constrained.pow.v2f64(
650 <2 x double> <double 42.1, double 42.2>,
651 <2 x double> <double 3.0, double 3.0>,
652 metadata !"round.dynamic",
653 metadata !"fpexcept.strict")
654 ret <2 x double> %pow
657 define <3 x float> @constrained_vector_pow_v3f32() {
658 ; CHECK-LABEL: constrained_vector_pow_v3f32:
659 ; CHECK: # %bb.0: # %entry
660 ; CHECK-NEXT: subq $40, %rsp
661 ; CHECK-NEXT: .cfi_def_cfa_offset 48
662 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
663 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
664 ; CHECK-NEXT: callq powf
665 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
666 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
667 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
668 ; CHECK-NEXT: callq powf
669 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
670 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
671 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
672 ; CHECK-NEXT: callq powf
673 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
674 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
675 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
676 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
677 ; CHECK-NEXT: movaps %xmm1, %xmm0
678 ; CHECK-NEXT: addq $40, %rsp
679 ; CHECK-NEXT: .cfi_def_cfa_offset 8
682 %pow = call <3 x float> @llvm.experimental.constrained.pow.v3f32(
683 <3 x float> <float 42.0, float 43.0, float 44.0>,
684 <3 x float> <float 3.0, float 3.0, float 3.0>,
685 metadata !"round.dynamic",
686 metadata !"fpexcept.strict")
690 define <3 x double> @constrained_vector_pow_v3f64() {
691 ; CHECK-LABEL: constrained_vector_pow_v3f64:
692 ; CHECK: # %bb.0: # %entry
693 ; CHECK-NEXT: subq $24, %rsp
694 ; CHECK-NEXT: .cfi_def_cfa_offset 32
695 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
696 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
697 ; CHECK-NEXT: callq pow
698 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
699 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
700 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
701 ; CHECK-NEXT: callq pow
702 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
703 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
704 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
705 ; CHECK-NEXT: callq pow
706 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
707 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
708 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
709 ; CHECK-NEXT: # xmm0 = mem[0],zero
710 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
711 ; CHECK-NEXT: # xmm1 = mem[0],zero
712 ; CHECK-NEXT: addq $24, %rsp
713 ; CHECK-NEXT: .cfi_def_cfa_offset 8
716 %pow = call <3 x double> @llvm.experimental.constrained.pow.v3f64(
717 <3 x double> <double 42.0, double 42.1, double 42.2>,
718 <3 x double> <double 3.0, double 3.0, double 3.0>,
719 metadata !"round.dynamic",
720 metadata !"fpexcept.strict")
721 ret <3 x double> %pow
724 define <4 x double> @constrained_vector_pow_v4f64() {
725 ; CHECK-LABEL: constrained_vector_pow_v4f64:
726 ; CHECK: # %bb.0: # %entry
727 ; CHECK-NEXT: subq $40, %rsp
728 ; CHECK-NEXT: .cfi_def_cfa_offset 48
729 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
730 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
731 ; CHECK-NEXT: callq pow
732 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
733 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
734 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
735 ; CHECK-NEXT: callq pow
736 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
737 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
738 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
739 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
740 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
741 ; CHECK-NEXT: callq pow
742 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
743 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
744 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
745 ; CHECK-NEXT: callq pow
746 ; CHECK-NEXT: movaps %xmm0, %xmm1
747 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
748 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
749 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
750 ; CHECK-NEXT: addq $40, %rsp
751 ; CHECK-NEXT: .cfi_def_cfa_offset 8
754 %pow = call <4 x double> @llvm.experimental.constrained.pow.v4f64(
755 <4 x double> <double 42.1, double 42.2,
756 double 42.3, double 42.4>,
757 <4 x double> <double 3.0, double 3.0,
758 double 3.0, double 3.0>,
759 metadata !"round.dynamic",
760 metadata !"fpexcept.strict")
761 ret <4 x double> %pow
764 define <1 x float> @constrained_vector_powi_v1f32() {
765 ; CHECK-LABEL: constrained_vector_powi_v1f32:
766 ; CHECK: # %bb.0: # %entry
767 ; CHECK-NEXT: pushq %rax
768 ; CHECK-NEXT: .cfi_def_cfa_offset 16
769 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
770 ; CHECK-NEXT: movl $3, %edi
771 ; CHECK-NEXT: callq __powisf2
772 ; CHECK-NEXT: popq %rax
773 ; CHECK-NEXT: .cfi_def_cfa_offset 8
776 %powi = call <1 x float> @llvm.experimental.constrained.powi.v1f32(
777 <1 x float> <float 42.0>,
779 metadata !"round.dynamic",
780 metadata !"fpexcept.strict")
781 ret <1 x float> %powi
784 define <2 x double> @constrained_vector_powi_v2f64() {
785 ; CHECK-LABEL: constrained_vector_powi_v2f64:
786 ; CHECK: # %bb.0: # %entry
787 ; CHECK-NEXT: subq $24, %rsp
788 ; CHECK-NEXT: .cfi_def_cfa_offset 32
789 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
790 ; CHECK-NEXT: movl $3, %edi
791 ; CHECK-NEXT: callq __powidf2
792 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
793 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
794 ; CHECK-NEXT: movl $3, %edi
795 ; CHECK-NEXT: callq __powidf2
796 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
797 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
798 ; CHECK-NEXT: addq $24, %rsp
799 ; CHECK-NEXT: .cfi_def_cfa_offset 8
802 %powi = call <2 x double> @llvm.experimental.constrained.powi.v2f64(
803 <2 x double> <double 42.1, double 42.2>,
805 metadata !"round.dynamic",
806 metadata !"fpexcept.strict")
807 ret <2 x double> %powi
810 define <3 x float> @constrained_vector_powi_v3f32() {
811 ; CHECK-LABEL: constrained_vector_powi_v3f32:
812 ; CHECK: # %bb.0: # %entry
813 ; CHECK-NEXT: subq $40, %rsp
814 ; CHECK-NEXT: .cfi_def_cfa_offset 48
815 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
816 ; CHECK-NEXT: movl $3, %edi
817 ; CHECK-NEXT: callq __powisf2
818 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
819 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
820 ; CHECK-NEXT: movl $3, %edi
821 ; CHECK-NEXT: callq __powisf2
822 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
823 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
824 ; CHECK-NEXT: movl $3, %edi
825 ; CHECK-NEXT: callq __powisf2
826 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
827 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
828 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
829 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
830 ; CHECK-NEXT: movaps %xmm1, %xmm0
831 ; CHECK-NEXT: addq $40, %rsp
832 ; CHECK-NEXT: .cfi_def_cfa_offset 8
835 %powi = call <3 x float> @llvm.experimental.constrained.powi.v3f32(
836 <3 x float> <float 42.0, float 43.0, float 44.0>,
838 metadata !"round.dynamic",
839 metadata !"fpexcept.strict")
840 ret <3 x float> %powi
843 define <3 x double> @constrained_vector_powi_v3f64() {
844 ; CHECK-LABEL: constrained_vector_powi_v3f64:
845 ; CHECK: # %bb.0: # %entry
846 ; CHECK-NEXT: subq $24, %rsp
847 ; CHECK-NEXT: .cfi_def_cfa_offset 32
848 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
849 ; CHECK-NEXT: movl $3, %edi
850 ; CHECK-NEXT: callq __powidf2
851 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
852 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
853 ; CHECK-NEXT: movl $3, %edi
854 ; CHECK-NEXT: callq __powidf2
855 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
856 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
857 ; CHECK-NEXT: movl $3, %edi
858 ; CHECK-NEXT: callq __powidf2
859 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
860 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
861 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
862 ; CHECK-NEXT: # xmm0 = mem[0],zero
863 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
864 ; CHECK-NEXT: # xmm1 = mem[0],zero
865 ; CHECK-NEXT: addq $24, %rsp
866 ; CHECK-NEXT: .cfi_def_cfa_offset 8
869 %powi = call <3 x double> @llvm.experimental.constrained.powi.v3f64(
870 <3 x double> <double 42.0, double 42.1, double 42.2>,
872 metadata !"round.dynamic",
873 metadata !"fpexcept.strict")
874 ret <3 x double> %powi
877 define <4 x double> @constrained_vector_powi_v4f64() {
878 ; CHECK-LABEL: constrained_vector_powi_v4f64:
879 ; CHECK: # %bb.0: # %entry
880 ; CHECK-NEXT: subq $40, %rsp
881 ; CHECK-NEXT: .cfi_def_cfa_offset 48
882 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
883 ; CHECK-NEXT: movl $3, %edi
884 ; CHECK-NEXT: callq __powidf2
885 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
886 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
887 ; CHECK-NEXT: movl $3, %edi
888 ; CHECK-NEXT: callq __powidf2
889 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
890 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
891 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
892 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
893 ; CHECK-NEXT: movl $3, %edi
894 ; CHECK-NEXT: callq __powidf2
895 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
896 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
897 ; CHECK-NEXT: movl $3, %edi
898 ; CHECK-NEXT: callq __powidf2
899 ; CHECK-NEXT: movaps %xmm0, %xmm1
900 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
901 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
902 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
903 ; CHECK-NEXT: addq $40, %rsp
904 ; CHECK-NEXT: .cfi_def_cfa_offset 8
907 %powi = call <4 x double> @llvm.experimental.constrained.powi.v4f64(
908 <4 x double> <double 42.1, double 42.2,
909 double 42.3, double 42.4>,
911 metadata !"round.dynamic",
912 metadata !"fpexcept.strict")
913 ret <4 x double> %powi
916 define <1 x float> @constrained_vector_sin_v1f32() {
917 ; CHECK-LABEL: constrained_vector_sin_v1f32:
918 ; CHECK: # %bb.0: # %entry
919 ; CHECK-NEXT: pushq %rax
920 ; CHECK-NEXT: .cfi_def_cfa_offset 16
921 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
922 ; CHECK-NEXT: callq sinf
923 ; CHECK-NEXT: popq %rax
924 ; CHECK-NEXT: .cfi_def_cfa_offset 8
927 %sin = call <1 x float> @llvm.experimental.constrained.sin.v1f32(
928 <1 x float> <float 42.0>,
929 metadata !"round.dynamic",
930 metadata !"fpexcept.strict")
934 define <2 x double> @constrained_vector_sin_v2f64() {
935 ; CHECK-LABEL: constrained_vector_sin_v2f64:
936 ; CHECK: # %bb.0: # %entry
937 ; CHECK-NEXT: subq $24, %rsp
938 ; CHECK-NEXT: .cfi_def_cfa_offset 32
939 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
940 ; CHECK-NEXT: callq sin
941 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
942 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
943 ; CHECK-NEXT: callq sin
944 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
945 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
946 ; CHECK-NEXT: addq $24, %rsp
947 ; CHECK-NEXT: .cfi_def_cfa_offset 8
950 %sin = call <2 x double> @llvm.experimental.constrained.sin.v2f64(
951 <2 x double> <double 42.0, double 42.1>,
952 metadata !"round.dynamic",
953 metadata !"fpexcept.strict")
954 ret <2 x double> %sin
957 define <3 x float> @constrained_vector_sin_v3f32() {
958 ; CHECK-LABEL: constrained_vector_sin_v3f32:
959 ; CHECK: # %bb.0: # %entry
960 ; CHECK-NEXT: subq $40, %rsp
961 ; CHECK-NEXT: .cfi_def_cfa_offset 48
962 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
963 ; CHECK-NEXT: callq sinf
964 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
965 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
966 ; CHECK-NEXT: callq sinf
967 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
968 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
969 ; CHECK-NEXT: callq sinf
970 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
971 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
972 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
973 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
974 ; CHECK-NEXT: movaps %xmm1, %xmm0
975 ; CHECK-NEXT: addq $40, %rsp
976 ; CHECK-NEXT: .cfi_def_cfa_offset 8
979 %sin = call <3 x float> @llvm.experimental.constrained.sin.v3f32(
980 <3 x float> <float 42.0, float 43.0, float 44.0>,
981 metadata !"round.dynamic",
982 metadata !"fpexcept.strict")
986 define <3 x double> @constrained_vector_sin_v3f64() {
987 ; CHECK-LABEL: constrained_vector_sin_v3f64:
988 ; CHECK: # %bb.0: # %entry
989 ; CHECK-NEXT: subq $24, %rsp
990 ; CHECK-NEXT: .cfi_def_cfa_offset 32
991 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
992 ; CHECK-NEXT: callq sin
993 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
994 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
995 ; CHECK-NEXT: callq sin
996 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
997 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
998 ; CHECK-NEXT: callq sin
999 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1000 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1001 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1002 ; CHECK-NEXT: # xmm0 = mem[0],zero
1003 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1004 ; CHECK-NEXT: # xmm1 = mem[0],zero
1005 ; CHECK-NEXT: addq $24, %rsp
1006 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1009 %sin = call <3 x double> @llvm.experimental.constrained.sin.v3f64(
1010 <3 x double> <double 42.0, double 42.1, double 42.2>,
1011 metadata !"round.dynamic",
1012 metadata !"fpexcept.strict")
1013 ret <3 x double> %sin
1016 define <4 x double> @constrained_vector_sin_v4f64() {
1017 ; CHECK-LABEL: constrained_vector_sin_v4f64:
1018 ; CHECK: # %bb.0: # %entry
1019 ; CHECK-NEXT: subq $40, %rsp
1020 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1021 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1022 ; CHECK-NEXT: callq sin
1023 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1024 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1025 ; CHECK-NEXT: callq sin
1026 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1027 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1028 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1029 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1030 ; CHECK-NEXT: callq sin
1031 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1032 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1033 ; CHECK-NEXT: callq sin
1034 ; CHECK-NEXT: movaps %xmm0, %xmm1
1035 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1036 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1037 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1038 ; CHECK-NEXT: addq $40, %rsp
1039 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1042 %sin = call <4 x double> @llvm.experimental.constrained.sin.v4f64(
1043 <4 x double> <double 42.0, double 42.1,
1044 double 42.2, double 42.3>,
1045 metadata !"round.dynamic",
1046 metadata !"fpexcept.strict")
1047 ret <4 x double> %sin
1050 define <1 x float> @constrained_vector_cos_v1f32() {
1051 ; CHECK-LABEL: constrained_vector_cos_v1f32:
1052 ; CHECK: # %bb.0: # %entry
1053 ; CHECK-NEXT: pushq %rax
1054 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1055 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1056 ; CHECK-NEXT: callq cosf
1057 ; CHECK-NEXT: popq %rax
1058 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1061 %cos = call <1 x float> @llvm.experimental.constrained.cos.v1f32(
1062 <1 x float> <float 42.0>,
1063 metadata !"round.dynamic",
1064 metadata !"fpexcept.strict")
1065 ret <1 x float> %cos
1068 define <2 x double> @constrained_vector_cos_v2f64() {
1069 ; CHECK-LABEL: constrained_vector_cos_v2f64:
1070 ; CHECK: # %bb.0: # %entry
1071 ; CHECK-NEXT: subq $24, %rsp
1072 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1073 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1074 ; CHECK-NEXT: callq cos
1075 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1076 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1077 ; CHECK-NEXT: callq cos
1078 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1079 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1080 ; CHECK-NEXT: addq $24, %rsp
1081 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1084 %cos = call <2 x double> @llvm.experimental.constrained.cos.v2f64(
1085 <2 x double> <double 42.0, double 42.1>,
1086 metadata !"round.dynamic",
1087 metadata !"fpexcept.strict")
1088 ret <2 x double> %cos
1091 define <3 x float> @constrained_vector_cos_v3f32() {
1092 ; CHECK-LABEL: constrained_vector_cos_v3f32:
1093 ; CHECK: # %bb.0: # %entry
1094 ; CHECK-NEXT: subq $40, %rsp
1095 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1096 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1097 ; CHECK-NEXT: callq cosf
1098 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1099 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1100 ; CHECK-NEXT: callq cosf
1101 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1102 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1103 ; CHECK-NEXT: callq cosf
1104 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1105 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1106 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1107 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1108 ; CHECK-NEXT: movaps %xmm1, %xmm0
1109 ; CHECK-NEXT: addq $40, %rsp
1110 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1113 %cos = call <3 x float> @llvm.experimental.constrained.cos.v3f32(
1114 <3 x float> <float 42.0, float 43.0, float 44.0>,
1115 metadata !"round.dynamic",
1116 metadata !"fpexcept.strict")
1117 ret <3 x float> %cos
1120 define <3 x double> @constrained_vector_cos_v3f64() {
1121 ; CHECK-LABEL: constrained_vector_cos_v3f64:
1122 ; CHECK: # %bb.0: # %entry
1123 ; CHECK-NEXT: subq $24, %rsp
1124 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1125 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1126 ; CHECK-NEXT: callq cos
1127 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1128 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1129 ; CHECK-NEXT: callq cos
1130 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1131 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1132 ; CHECK-NEXT: callq cos
1133 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1134 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1135 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1136 ; CHECK-NEXT: # xmm0 = mem[0],zero
1137 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1138 ; CHECK-NEXT: # xmm1 = mem[0],zero
1139 ; CHECK-NEXT: addq $24, %rsp
1140 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1143 %cos = call <3 x double> @llvm.experimental.constrained.cos.v3f64(
1144 <3 x double> <double 42.0, double 42.1, double 42.2>,
1145 metadata !"round.dynamic",
1146 metadata !"fpexcept.strict")
1147 ret <3 x double> %cos
1150 define <4 x double> @constrained_vector_cos_v4f64() {
1151 ; CHECK-LABEL: constrained_vector_cos_v4f64:
1152 ; CHECK: # %bb.0: # %entry
1153 ; CHECK-NEXT: subq $40, %rsp
1154 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1155 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1156 ; CHECK-NEXT: callq cos
1157 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1158 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1159 ; CHECK-NEXT: callq cos
1160 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1161 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1162 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1163 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1164 ; CHECK-NEXT: callq cos
1165 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1166 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1167 ; CHECK-NEXT: callq cos
1168 ; CHECK-NEXT: movaps %xmm0, %xmm1
1169 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1170 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1171 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1172 ; CHECK-NEXT: addq $40, %rsp
1173 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1176 %cos = call <4 x double> @llvm.experimental.constrained.cos.v4f64(
1177 <4 x double> <double 42.0, double 42.1,
1178 double 42.2, double 42.3>,
1179 metadata !"round.dynamic",
1180 metadata !"fpexcept.strict")
1181 ret <4 x double> %cos
1184 define <1 x float> @constrained_vector_exp_v1f32() {
1185 ; CHECK-LABEL: constrained_vector_exp_v1f32:
1186 ; CHECK: # %bb.0: # %entry
1187 ; CHECK-NEXT: pushq %rax
1188 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1189 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1190 ; CHECK-NEXT: callq expf
1191 ; CHECK-NEXT: popq %rax
1192 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1195 %exp = call <1 x float> @llvm.experimental.constrained.exp.v1f32(
1196 <1 x float> <float 42.0>,
1197 metadata !"round.dynamic",
1198 metadata !"fpexcept.strict")
1199 ret <1 x float> %exp
1202 define <2 x double> @constrained_vector_exp_v2f64() {
1203 ; CHECK-LABEL: constrained_vector_exp_v2f64:
1204 ; CHECK: # %bb.0: # %entry
1205 ; CHECK-NEXT: subq $24, %rsp
1206 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1207 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1208 ; CHECK-NEXT: callq exp
1209 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1210 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1211 ; CHECK-NEXT: callq exp
1212 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1213 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1214 ; CHECK-NEXT: addq $24, %rsp
1215 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1218 %exp = call <2 x double> @llvm.experimental.constrained.exp.v2f64(
1219 <2 x double> <double 42.0, double 42.1>,
1220 metadata !"round.dynamic",
1221 metadata !"fpexcept.strict")
1222 ret <2 x double> %exp
1225 define <3 x float> @constrained_vector_exp_v3f32() {
1226 ; CHECK-LABEL: constrained_vector_exp_v3f32:
1227 ; CHECK: # %bb.0: # %entry
1228 ; CHECK-NEXT: subq $40, %rsp
1229 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1230 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1231 ; CHECK-NEXT: callq expf
1232 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1233 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1234 ; CHECK-NEXT: callq expf
1235 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1236 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1237 ; CHECK-NEXT: callq expf
1238 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1239 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1240 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1241 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1242 ; CHECK-NEXT: movaps %xmm1, %xmm0
1243 ; CHECK-NEXT: addq $40, %rsp
1244 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1247 %exp = call <3 x float> @llvm.experimental.constrained.exp.v3f32(
1248 <3 x float> <float 42.0, float 43.0, float 44.0>,
1249 metadata !"round.dynamic",
1250 metadata !"fpexcept.strict")
1251 ret <3 x float> %exp
1254 define <3 x double> @constrained_vector_exp_v3f64() {
1255 ; CHECK-LABEL: constrained_vector_exp_v3f64:
1256 ; CHECK: # %bb.0: # %entry
1257 ; CHECK-NEXT: subq $24, %rsp
1258 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1259 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1260 ; CHECK-NEXT: callq exp
1261 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1262 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1263 ; CHECK-NEXT: callq exp
1264 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1265 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1266 ; CHECK-NEXT: callq exp
1267 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1268 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1269 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1270 ; CHECK-NEXT: # xmm0 = mem[0],zero
1271 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1272 ; CHECK-NEXT: # xmm1 = mem[0],zero
1273 ; CHECK-NEXT: addq $24, %rsp
1274 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1277 %exp = call <3 x double> @llvm.experimental.constrained.exp.v3f64(
1278 <3 x double> <double 42.0, double 42.1, double 42.2>,
1279 metadata !"round.dynamic",
1280 metadata !"fpexcept.strict")
1281 ret <3 x double> %exp
1284 define <4 x double> @constrained_vector_exp_v4f64() {
1285 ; CHECK-LABEL: constrained_vector_exp_v4f64:
1286 ; CHECK: # %bb.0: # %entry
1287 ; CHECK-NEXT: subq $40, %rsp
1288 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1289 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1290 ; CHECK-NEXT: callq exp
1291 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1292 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1293 ; CHECK-NEXT: callq exp
1294 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1295 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1296 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1297 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1298 ; CHECK-NEXT: callq exp
1299 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1300 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1301 ; CHECK-NEXT: callq exp
1302 ; CHECK-NEXT: movaps %xmm0, %xmm1
1303 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1304 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1305 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1306 ; CHECK-NEXT: addq $40, %rsp
1307 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1310 %exp = call <4 x double> @llvm.experimental.constrained.exp.v4f64(
1311 <4 x double> <double 42.0, double 42.1,
1312 double 42.2, double 42.3>,
1313 metadata !"round.dynamic",
1314 metadata !"fpexcept.strict")
1315 ret <4 x double> %exp
1318 define <1 x float> @constrained_vector_exp2_v1f32() {
1319 ; CHECK-LABEL: constrained_vector_exp2_v1f32:
1320 ; CHECK: # %bb.0: # %entry
1321 ; CHECK-NEXT: pushq %rax
1322 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1323 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1324 ; CHECK-NEXT: callq exp2f
1325 ; CHECK-NEXT: popq %rax
1326 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1329 %exp2 = call <1 x float> @llvm.experimental.constrained.exp2.v1f32(
1330 <1 x float> <float 42.0>,
1331 metadata !"round.dynamic",
1332 metadata !"fpexcept.strict")
1333 ret <1 x float> %exp2
1336 define <2 x double> @constrained_vector_exp2_v2f64() {
1337 ; CHECK-LABEL: constrained_vector_exp2_v2f64:
1338 ; CHECK: # %bb.0: # %entry
1339 ; CHECK-NEXT: subq $24, %rsp
1340 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1341 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1342 ; CHECK-NEXT: callq exp2
1343 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1344 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1345 ; CHECK-NEXT: callq exp2
1346 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1347 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1348 ; CHECK-NEXT: addq $24, %rsp
1349 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1352 %exp2 = call <2 x double> @llvm.experimental.constrained.exp2.v2f64(
1353 <2 x double> <double 42.1, double 42.0>,
1354 metadata !"round.dynamic",
1355 metadata !"fpexcept.strict")
1356 ret <2 x double> %exp2
1359 define <3 x float> @constrained_vector_exp2_v3f32() {
1360 ; CHECK-LABEL: constrained_vector_exp2_v3f32:
1361 ; CHECK: # %bb.0: # %entry
1362 ; CHECK-NEXT: subq $40, %rsp
1363 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1364 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1365 ; CHECK-NEXT: callq exp2f
1366 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1367 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1368 ; CHECK-NEXT: callq exp2f
1369 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1370 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1371 ; CHECK-NEXT: callq exp2f
1372 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1373 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1374 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1375 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1376 ; CHECK-NEXT: movaps %xmm1, %xmm0
1377 ; CHECK-NEXT: addq $40, %rsp
1378 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1381 %exp2 = call <3 x float> @llvm.experimental.constrained.exp2.v3f32(
1382 <3 x float> <float 42.0, float 43.0, float 44.0>,
1383 metadata !"round.dynamic",
1384 metadata !"fpexcept.strict")
1385 ret <3 x float> %exp2
1388 define <3 x double> @constrained_vector_exp2_v3f64() {
1389 ; CHECK-LABEL: constrained_vector_exp2_v3f64:
1390 ; CHECK: # %bb.0: # %entry
1391 ; CHECK-NEXT: subq $24, %rsp
1392 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1393 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1394 ; CHECK-NEXT: callq exp2
1395 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1396 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1397 ; CHECK-NEXT: callq exp2
1398 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1399 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1400 ; CHECK-NEXT: callq exp2
1401 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1402 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1403 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1404 ; CHECK-NEXT: # xmm0 = mem[0],zero
1405 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1406 ; CHECK-NEXT: # xmm1 = mem[0],zero
1407 ; CHECK-NEXT: addq $24, %rsp
1408 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1411 %exp2 = call <3 x double> @llvm.experimental.constrained.exp2.v3f64(
1412 <3 x double> <double 42.0, double 42.1, double 42.2>,
1413 metadata !"round.dynamic",
1414 metadata !"fpexcept.strict")
1415 ret <3 x double> %exp2
1418 define <4 x double> @constrained_vector_exp2_v4f64() {
1419 ; CHECK-LABEL: constrained_vector_exp2_v4f64:
1420 ; CHECK: # %bb.0: # %entry
1421 ; CHECK-NEXT: subq $40, %rsp
1422 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1423 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1424 ; CHECK-NEXT: callq exp2
1425 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1426 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1427 ; CHECK-NEXT: callq exp2
1428 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1429 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1430 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1431 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1432 ; CHECK-NEXT: callq exp2
1433 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1434 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1435 ; CHECK-NEXT: callq exp2
1436 ; CHECK-NEXT: movaps %xmm0, %xmm1
1437 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1438 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1439 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1440 ; CHECK-NEXT: addq $40, %rsp
1441 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1444 %exp2 = call <4 x double> @llvm.experimental.constrained.exp2.v4f64(
1445 <4 x double> <double 42.1, double 42.2,
1446 double 42.3, double 42.4>,
1447 metadata !"round.dynamic",
1448 metadata !"fpexcept.strict")
1449 ret <4 x double> %exp2
1452 define <1 x float> @constrained_vector_log_v1f32() {
1453 ; CHECK-LABEL: constrained_vector_log_v1f32:
1454 ; CHECK: # %bb.0: # %entry
1455 ; CHECK-NEXT: pushq %rax
1456 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1457 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1458 ; CHECK-NEXT: callq logf
1459 ; CHECK-NEXT: popq %rax
1460 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1463 %log = call <1 x float> @llvm.experimental.constrained.log.v1f32(
1464 <1 x float> <float 42.0>,
1465 metadata !"round.dynamic",
1466 metadata !"fpexcept.strict")
1467 ret <1 x float> %log
1470 define <2 x double> @constrained_vector_log_v2f64() {
1471 ; CHECK-LABEL: constrained_vector_log_v2f64:
1472 ; CHECK: # %bb.0: # %entry
1473 ; CHECK-NEXT: subq $24, %rsp
1474 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1475 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1476 ; CHECK-NEXT: callq log
1477 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1478 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1479 ; CHECK-NEXT: callq log
1480 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1481 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1482 ; CHECK-NEXT: addq $24, %rsp
1483 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1486 %log = call <2 x double> @llvm.experimental.constrained.log.v2f64(
1487 <2 x double> <double 42.0, double 42.1>,
1488 metadata !"round.dynamic",
1489 metadata !"fpexcept.strict")
1490 ret <2 x double> %log
1493 define <3 x float> @constrained_vector_log_v3f32() {
1494 ; CHECK-LABEL: constrained_vector_log_v3f32:
1495 ; CHECK: # %bb.0: # %entry
1496 ; CHECK-NEXT: subq $40, %rsp
1497 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1498 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1499 ; CHECK-NEXT: callq logf
1500 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1501 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1502 ; CHECK-NEXT: callq logf
1503 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1504 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1505 ; CHECK-NEXT: callq logf
1506 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1507 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1508 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1509 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1510 ; CHECK-NEXT: movaps %xmm1, %xmm0
1511 ; CHECK-NEXT: addq $40, %rsp
1512 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1515 %log = call <3 x float> @llvm.experimental.constrained.log.v3f32(
1516 <3 x float> <float 42.0, float 43.0, float 44.0>,
1517 metadata !"round.dynamic",
1518 metadata !"fpexcept.strict")
1519 ret <3 x float> %log
1522 define <3 x double> @constrained_vector_log_v3f64() {
1523 ; CHECK-LABEL: constrained_vector_log_v3f64:
1524 ; CHECK: # %bb.0: # %entry
1525 ; CHECK-NEXT: subq $24, %rsp
1526 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1527 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1528 ; CHECK-NEXT: callq log
1529 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1530 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1531 ; CHECK-NEXT: callq log
1532 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1533 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1534 ; CHECK-NEXT: callq log
1535 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1536 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1537 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1538 ; CHECK-NEXT: # xmm0 = mem[0],zero
1539 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1540 ; CHECK-NEXT: # xmm1 = mem[0],zero
1541 ; CHECK-NEXT: addq $24, %rsp
1542 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1545 %log = call <3 x double> @llvm.experimental.constrained.log.v3f64(
1546 <3 x double> <double 42.0, double 42.1, double 42.2>,
1547 metadata !"round.dynamic",
1548 metadata !"fpexcept.strict")
1549 ret <3 x double> %log
1552 define <4 x double> @constrained_vector_log_v4f64() {
1553 ; CHECK-LABEL: constrained_vector_log_v4f64:
1554 ; CHECK: # %bb.0: # %entry
1555 ; CHECK-NEXT: subq $40, %rsp
1556 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1557 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1558 ; CHECK-NEXT: callq log
1559 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1560 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1561 ; CHECK-NEXT: callq log
1562 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1563 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1564 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1565 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1566 ; CHECK-NEXT: callq log
1567 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1568 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1569 ; CHECK-NEXT: callq log
1570 ; CHECK-NEXT: movaps %xmm0, %xmm1
1571 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1572 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1573 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1574 ; CHECK-NEXT: addq $40, %rsp
1575 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1578 %log = call <4 x double> @llvm.experimental.constrained.log.v4f64(
1579 <4 x double> <double 42.0, double 42.1,
1580 double 42.2, double 42.3>,
1581 metadata !"round.dynamic",
1582 metadata !"fpexcept.strict")
1583 ret <4 x double> %log
1586 define <1 x float> @constrained_vector_log10_v1f32() {
1587 ; CHECK-LABEL: constrained_vector_log10_v1f32:
1588 ; CHECK: # %bb.0: # %entry
1589 ; CHECK-NEXT: pushq %rax
1590 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1591 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1592 ; CHECK-NEXT: callq log10f
1593 ; CHECK-NEXT: popq %rax
1594 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1597 %log10 = call <1 x float> @llvm.experimental.constrained.log10.v1f32(
1598 <1 x float> <float 42.0>,
1599 metadata !"round.dynamic",
1600 metadata !"fpexcept.strict")
1601 ret <1 x float> %log10
1604 define <2 x double> @constrained_vector_log10_v2f64() {
1605 ; CHECK-LABEL: constrained_vector_log10_v2f64:
1606 ; CHECK: # %bb.0: # %entry
1607 ; CHECK-NEXT: subq $24, %rsp
1608 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1609 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1610 ; CHECK-NEXT: callq log10
1611 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1612 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1613 ; CHECK-NEXT: callq log10
1614 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1615 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1616 ; CHECK-NEXT: addq $24, %rsp
1617 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1620 %log10 = call <2 x double> @llvm.experimental.constrained.log10.v2f64(
1621 <2 x double> <double 42.0, double 42.1>,
1622 metadata !"round.dynamic",
1623 metadata !"fpexcept.strict")
1624 ret <2 x double> %log10
1627 define <3 x float> @constrained_vector_log10_v3f32() {
1628 ; CHECK-LABEL: constrained_vector_log10_v3f32:
1629 ; CHECK: # %bb.0: # %entry
1630 ; CHECK-NEXT: subq $40, %rsp
1631 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1632 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1633 ; CHECK-NEXT: callq log10f
1634 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1635 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1636 ; CHECK-NEXT: callq log10f
1637 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1638 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1639 ; CHECK-NEXT: callq log10f
1640 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1641 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1642 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1643 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1644 ; CHECK-NEXT: movaps %xmm1, %xmm0
1645 ; CHECK-NEXT: addq $40, %rsp
1646 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1649 %log10 = call <3 x float> @llvm.experimental.constrained.log10.v3f32(
1650 <3 x float> <float 42.0, float 43.0, float 44.0>,
1651 metadata !"round.dynamic",
1652 metadata !"fpexcept.strict")
1653 ret <3 x float> %log10
1656 define <3 x double> @constrained_vector_log10_v3f64() {
1657 ; CHECK-LABEL: constrained_vector_log10_v3f64:
1658 ; CHECK: # %bb.0: # %entry
1659 ; CHECK-NEXT: subq $24, %rsp
1660 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1661 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1662 ; CHECK-NEXT: callq log10
1663 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1664 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1665 ; CHECK-NEXT: callq log10
1666 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1667 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1668 ; CHECK-NEXT: callq log10
1669 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1670 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1671 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1672 ; CHECK-NEXT: # xmm0 = mem[0],zero
1673 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1674 ; CHECK-NEXT: # xmm1 = mem[0],zero
1675 ; CHECK-NEXT: addq $24, %rsp
1676 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1679 %log10 = call <3 x double> @llvm.experimental.constrained.log10.v3f64(
1680 <3 x double> <double 42.0, double 42.1, double 42.2>,
1681 metadata !"round.dynamic",
1682 metadata !"fpexcept.strict")
1683 ret <3 x double> %log10
1686 define <4 x double> @constrained_vector_log10_v4f64() {
1687 ; CHECK-LABEL: constrained_vector_log10_v4f64:
1688 ; CHECK: # %bb.0: # %entry
1689 ; CHECK-NEXT: subq $40, %rsp
1690 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1691 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1692 ; CHECK-NEXT: callq log10
1693 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1694 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1695 ; CHECK-NEXT: callq log10
1696 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1697 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1698 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1699 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1700 ; CHECK-NEXT: callq log10
1701 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1702 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1703 ; CHECK-NEXT: callq log10
1704 ; CHECK-NEXT: movaps %xmm0, %xmm1
1705 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1706 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1707 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1708 ; CHECK-NEXT: addq $40, %rsp
1709 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1712 %log10 = call <4 x double> @llvm.experimental.constrained.log10.v4f64(
1713 <4 x double> <double 42.0, double 42.1,
1714 double 42.2, double 42.3>,
1715 metadata !"round.dynamic",
1716 metadata !"fpexcept.strict")
1717 ret <4 x double> %log10
1720 define <1 x float> @constrained_vector_log2_v1f32() {
1721 ; CHECK-LABEL: constrained_vector_log2_v1f32:
1722 ; CHECK: # %bb.0: # %entry
1723 ; CHECK-NEXT: pushq %rax
1724 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1725 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1726 ; CHECK-NEXT: callq log2f
1727 ; CHECK-NEXT: popq %rax
1728 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1731 %log2 = call <1 x float> @llvm.experimental.constrained.log2.v1f32(
1732 <1 x float> <float 42.0>,
1733 metadata !"round.dynamic",
1734 metadata !"fpexcept.strict")
1735 ret <1 x float> %log2
1738 define <2 x double> @constrained_vector_log2_v2f64() {
1739 ; CHECK-LABEL: constrained_vector_log2_v2f64:
1740 ; CHECK: # %bb.0: # %entry
1741 ; CHECK-NEXT: subq $24, %rsp
1742 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1743 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1744 ; CHECK-NEXT: callq log2
1745 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1746 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1747 ; CHECK-NEXT: callq log2
1748 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1749 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1750 ; CHECK-NEXT: addq $24, %rsp
1751 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1754 %log2 = call <2 x double> @llvm.experimental.constrained.log2.v2f64(
1755 <2 x double> <double 42.0, double 42.1>,
1756 metadata !"round.dynamic",
1757 metadata !"fpexcept.strict")
1758 ret <2 x double> %log2
1761 define <3 x float> @constrained_vector_log2_v3f32() {
1762 ; CHECK-LABEL: constrained_vector_log2_v3f32:
1763 ; CHECK: # %bb.0: # %entry
1764 ; CHECK-NEXT: subq $40, %rsp
1765 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1766 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1767 ; CHECK-NEXT: callq log2f
1768 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1769 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1770 ; CHECK-NEXT: callq log2f
1771 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1772 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1773 ; CHECK-NEXT: callq log2f
1774 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1775 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1776 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1777 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1778 ; CHECK-NEXT: movaps %xmm1, %xmm0
1779 ; CHECK-NEXT: addq $40, %rsp
1780 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1783 %log2 = call <3 x float> @llvm.experimental.constrained.log2.v3f32(
1784 <3 x float> <float 42.0, float 43.0, float 44.0>,
1785 metadata !"round.dynamic",
1786 metadata !"fpexcept.strict")
1787 ret <3 x float> %log2
1790 define <3 x double> @constrained_vector_log2_v3f64() {
1791 ; CHECK-LABEL: constrained_vector_log2_v3f64:
1792 ; CHECK: # %bb.0: # %entry
1793 ; CHECK-NEXT: subq $24, %rsp
1794 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1795 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1796 ; CHECK-NEXT: callq log2
1797 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1798 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1799 ; CHECK-NEXT: callq log2
1800 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1801 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1802 ; CHECK-NEXT: callq log2
1803 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1804 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1805 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1806 ; CHECK-NEXT: # xmm0 = mem[0],zero
1807 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1808 ; CHECK-NEXT: # xmm1 = mem[0],zero
1809 ; CHECK-NEXT: addq $24, %rsp
1810 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1813 %log2 = call <3 x double> @llvm.experimental.constrained.log2.v3f64(
1814 <3 x double> <double 42.0, double 42.1, double 42.2>,
1815 metadata !"round.dynamic",
1816 metadata !"fpexcept.strict")
1817 ret <3 x double> %log2
1820 define <4 x double> @constrained_vector_log2_v4f64() {
1821 ; CHECK-LABEL: constrained_vector_log2_v4f64:
1822 ; CHECK: # %bb.0: # %entry
1823 ; CHECK-NEXT: subq $40, %rsp
1824 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1825 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1826 ; CHECK-NEXT: callq log2
1827 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1828 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1829 ; CHECK-NEXT: callq log2
1830 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1831 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1832 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1833 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1834 ; CHECK-NEXT: callq log2
1835 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1836 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1837 ; CHECK-NEXT: callq log2
1838 ; CHECK-NEXT: movaps %xmm0, %xmm1
1839 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1840 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1841 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1842 ; CHECK-NEXT: addq $40, %rsp
1843 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1846 %log2 = call <4 x double> @llvm.experimental.constrained.log2.v4f64(
1847 <4 x double> <double 42.0, double 42.1,
1848 double 42.2, double 42.3>,
1849 metadata !"round.dynamic",
1850 metadata !"fpexcept.strict")
1851 ret <4 x double> %log2
1854 define <1 x float> @constrained_vector_rint_v1f32() {
1855 ; CHECK-LABEL: constrained_vector_rint_v1f32:
1856 ; CHECK: # %bb.0: # %entry
1857 ; CHECK-NEXT: pushq %rax
1858 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1859 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1860 ; CHECK-NEXT: callq rintf
1861 ; CHECK-NEXT: popq %rax
1862 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1865 %rint = call <1 x float> @llvm.experimental.constrained.rint.v1f32(
1866 <1 x float> <float 42.0>,
1867 metadata !"round.dynamic",
1868 metadata !"fpexcept.strict")
1869 ret <1 x float> %rint
1872 define <2 x double> @constrained_vector_rint_v2f64() {
1873 ; CHECK-LABEL: constrained_vector_rint_v2f64:
1874 ; CHECK: # %bb.0: # %entry
1875 ; CHECK-NEXT: subq $24, %rsp
1876 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1877 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1878 ; CHECK-NEXT: callq rint
1879 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1880 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1881 ; CHECK-NEXT: callq rint
1882 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1883 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1884 ; CHECK-NEXT: addq $24, %rsp
1885 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1888 %rint = call <2 x double> @llvm.experimental.constrained.rint.v2f64(
1889 <2 x double> <double 42.1, double 42.0>,
1890 metadata !"round.dynamic",
1891 metadata !"fpexcept.strict")
1892 ret <2 x double> %rint
1895 define <3 x float> @constrained_vector_rint_v3f32() {
1896 ; CHECK-LABEL: constrained_vector_rint_v3f32:
1897 ; CHECK: # %bb.0: # %entry
1898 ; CHECK-NEXT: subq $40, %rsp
1899 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1900 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1901 ; CHECK-NEXT: callq rintf
1902 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1903 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1904 ; CHECK-NEXT: callq rintf
1905 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1906 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1907 ; CHECK-NEXT: callq rintf
1908 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
1909 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1910 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1911 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1912 ; CHECK-NEXT: movaps %xmm1, %xmm0
1913 ; CHECK-NEXT: addq $40, %rsp
1914 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1917 %rint = call <3 x float> @llvm.experimental.constrained.rint.v3f32(
1918 <3 x float> <float 42.0, float 43.0, float 44.0>,
1919 metadata !"round.dynamic",
1920 metadata !"fpexcept.strict")
1921 ret <3 x float> %rint
1924 define <3 x double> @constrained_vector_rint_v3f64() {
1925 ; CHECK-LABEL: constrained_vector_rint_v3f64:
1926 ; CHECK: # %bb.0: # %entry
1927 ; CHECK-NEXT: subq $24, %rsp
1928 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1929 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1930 ; CHECK-NEXT: callq rint
1931 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
1932 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1933 ; CHECK-NEXT: callq rint
1934 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
1935 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1936 ; CHECK-NEXT: callq rint
1937 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
1938 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
1939 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
1940 ; CHECK-NEXT: # xmm0 = mem[0],zero
1941 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
1942 ; CHECK-NEXT: # xmm1 = mem[0],zero
1943 ; CHECK-NEXT: addq $24, %rsp
1944 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1947 %rint = call <3 x double> @llvm.experimental.constrained.rint.v3f64(
1948 <3 x double> <double 42.0, double 42.1, double 42.2>,
1949 metadata !"round.dynamic",
1950 metadata !"fpexcept.strict")
1951 ret <3 x double> %rint
1954 define <4 x double> @constrained_vector_rint_v4f64() {
1955 ; CHECK-LABEL: constrained_vector_rint_v4f64:
1956 ; CHECK: # %bb.0: # %entry
1957 ; CHECK-NEXT: subq $40, %rsp
1958 ; CHECK-NEXT: .cfi_def_cfa_offset 48
1959 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1960 ; CHECK-NEXT: callq rint
1961 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1962 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1963 ; CHECK-NEXT: callq rint
1964 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
1965 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
1966 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1967 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1968 ; CHECK-NEXT: callq rint
1969 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1970 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1971 ; CHECK-NEXT: callq rint
1972 ; CHECK-NEXT: movaps %xmm0, %xmm1
1973 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
1974 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
1975 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1976 ; CHECK-NEXT: addq $40, %rsp
1977 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1980 %rint = call <4 x double> @llvm.experimental.constrained.rint.v4f64(
1981 <4 x double> <double 42.1, double 42.2,
1982 double 42.3, double 42.4>,
1983 metadata !"round.dynamic",
1984 metadata !"fpexcept.strict")
1985 ret <4 x double> %rint
1988 define <1 x float> @constrained_vector_nearbyint_v1f32() {
1989 ; CHECK-LABEL: constrained_vector_nearbyint_v1f32:
1990 ; CHECK: # %bb.0: # %entry
1991 ; CHECK-NEXT: pushq %rax
1992 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1993 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1994 ; CHECK-NEXT: callq nearbyintf
1995 ; CHECK-NEXT: popq %rax
1996 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1999 %nearby = call <1 x float> @llvm.experimental.constrained.nearbyint.v1f32(
2000 <1 x float> <float 42.0>,
2001 metadata !"round.dynamic",
2002 metadata !"fpexcept.strict")
2003 ret <1 x float> %nearby
2006 define <2 x double> @constrained_vector_nearbyint_v2f64() {
2007 ; CHECK-LABEL: constrained_vector_nearbyint_v2f64:
2008 ; CHECK: # %bb.0: # %entry
2009 ; CHECK-NEXT: subq $24, %rsp
2010 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2011 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2012 ; CHECK-NEXT: callq nearbyint
2013 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2014 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2015 ; CHECK-NEXT: callq nearbyint
2016 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2017 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2018 ; CHECK-NEXT: addq $24, %rsp
2019 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2022 %nearby = call <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(
2023 <2 x double> <double 42.1, double 42.0>,
2024 metadata !"round.dynamic",
2025 metadata !"fpexcept.strict")
2026 ret <2 x double> %nearby
2029 define <3 x float> @constrained_vector_nearbyint_v3f32() {
2030 ; CHECK-LABEL: constrained_vector_nearbyint_v3f32:
2031 ; CHECK: # %bb.0: # %entry
2032 ; CHECK-NEXT: subq $40, %rsp
2033 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2034 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2035 ; CHECK-NEXT: callq nearbyintf
2036 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2037 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2038 ; CHECK-NEXT: callq nearbyintf
2039 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2040 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2041 ; CHECK-NEXT: callq nearbyintf
2042 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2043 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2044 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2045 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2046 ; CHECK-NEXT: movaps %xmm1, %xmm0
2047 ; CHECK-NEXT: addq $40, %rsp
2048 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2051 %nearby = call <3 x float> @llvm.experimental.constrained.nearbyint.v3f32(
2052 <3 x float> <float 42.0, float 43.0, float 44.0>,
2053 metadata !"round.dynamic",
2054 metadata !"fpexcept.strict")
2055 ret <3 x float> %nearby
2058 define <3 x double> @constrained_vector_nearby_v3f64() {
2059 ; CHECK-LABEL: constrained_vector_nearby_v3f64:
2060 ; CHECK: # %bb.0: # %entry
2061 ; CHECK-NEXT: subq $24, %rsp
2062 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2063 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2064 ; CHECK-NEXT: callq nearbyint
2065 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2066 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2067 ; CHECK-NEXT: callq nearbyint
2068 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2069 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2070 ; CHECK-NEXT: callq nearbyint
2071 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2072 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2073 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2074 ; CHECK-NEXT: # xmm0 = mem[0],zero
2075 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2076 ; CHECK-NEXT: # xmm1 = mem[0],zero
2077 ; CHECK-NEXT: addq $24, %rsp
2078 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2081 %nearby = call <3 x double> @llvm.experimental.constrained.nearbyint.v3f64(
2082 <3 x double> <double 42.0, double 42.1, double 42.2>,
2083 metadata !"round.dynamic",
2084 metadata !"fpexcept.strict")
2085 ret <3 x double> %nearby
2088 define <4 x double> @constrained_vector_nearbyint_v4f64() {
2089 ; CHECK-LABEL: constrained_vector_nearbyint_v4f64:
2090 ; CHECK: # %bb.0: # %entry
2091 ; CHECK-NEXT: subq $40, %rsp
2092 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2093 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2094 ; CHECK-NEXT: callq nearbyint
2095 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2096 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2097 ; CHECK-NEXT: callq nearbyint
2098 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2099 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2100 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2101 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2102 ; CHECK-NEXT: callq nearbyint
2103 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2104 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2105 ; CHECK-NEXT: callq nearbyint
2106 ; CHECK-NEXT: movaps %xmm0, %xmm1
2107 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2108 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2109 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2110 ; CHECK-NEXT: addq $40, %rsp
2111 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2114 %nearby = call <4 x double> @llvm.experimental.constrained.nearbyint.v4f64(
2115 <4 x double> <double 42.1, double 42.2,
2116 double 42.3, double 42.4>,
2117 metadata !"round.dynamic",
2118 metadata !"fpexcept.strict")
2119 ret <4 x double> %nearby
2122 define <1 x float> @constrained_vector_maxnum_v1f32() {
2123 ; CHECK-LABEL: constrained_vector_maxnum_v1f32:
2124 ; CHECK: # %bb.0: # %entry
2125 ; CHECK-NEXT: pushq %rax
2126 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2127 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2128 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2129 ; CHECK-NEXT: callq fmaxf
2130 ; CHECK-NEXT: popq %rax
2131 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2134 %max = call <1 x float> @llvm.experimental.constrained.maxnum.v1f32(
2135 <1 x float> <float 42.0>, <1 x float> <float 41.0>,
2136 metadata !"round.dynamic",
2137 metadata !"fpexcept.strict")
2138 ret <1 x float> %max
2141 define <2 x double> @constrained_vector_maxnum_v2f64() {
2142 ; CHECK-LABEL: constrained_vector_maxnum_v2f64:
2143 ; CHECK: # %bb.0: # %entry
2144 ; CHECK-NEXT: subq $24, %rsp
2145 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2146 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2147 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2148 ; CHECK-NEXT: callq fmax
2149 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2150 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2151 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2152 ; CHECK-NEXT: callq fmax
2153 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2154 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2155 ; CHECK-NEXT: addq $24, %rsp
2156 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2159 %max = call <2 x double> @llvm.experimental.constrained.maxnum.v2f64(
2160 <2 x double> <double 43.0, double 42.0>,
2161 <2 x double> <double 41.0, double 40.0>,
2162 metadata !"round.dynamic",
2163 metadata !"fpexcept.strict")
2164 ret <2 x double> %max
2167 define <3 x float> @constrained_vector_maxnum_v3f32() {
2168 ; CHECK-LABEL: constrained_vector_maxnum_v3f32:
2169 ; CHECK: # %bb.0: # %entry
2170 ; CHECK-NEXT: subq $40, %rsp
2171 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2172 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2173 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2174 ; CHECK-NEXT: callq fmaxf
2175 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2176 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2177 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2178 ; CHECK-NEXT: callq fmaxf
2179 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2180 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2181 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2182 ; CHECK-NEXT: callq fmaxf
2183 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2184 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2185 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2186 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2187 ; CHECK-NEXT: movaps %xmm1, %xmm0
2188 ; CHECK-NEXT: addq $40, %rsp
2189 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2192 %max = call <3 x float> @llvm.experimental.constrained.maxnum.v3f32(
2193 <3 x float> <float 43.0, float 44.0, float 45.0>,
2194 <3 x float> <float 41.0, float 42.0, float 43.0>,
2195 metadata !"round.dynamic",
2196 metadata !"fpexcept.strict")
2197 ret <3 x float> %max
2200 define <3 x double> @constrained_vector_max_v3f64() {
2201 ; CHECK-LABEL: constrained_vector_max_v3f64:
2202 ; CHECK: # %bb.0: # %entry
2203 ; CHECK-NEXT: subq $24, %rsp
2204 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2205 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2206 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2207 ; CHECK-NEXT: callq fmax
2208 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2209 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2210 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2211 ; CHECK-NEXT: callq fmax
2212 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2213 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2214 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2215 ; CHECK-NEXT: callq fmax
2216 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2217 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2218 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2219 ; CHECK-NEXT: # xmm0 = mem[0],zero
2220 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2221 ; CHECK-NEXT: # xmm1 = mem[0],zero
2222 ; CHECK-NEXT: addq $24, %rsp
2223 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2226 %max = call <3 x double> @llvm.experimental.constrained.maxnum.v3f64(
2227 <3 x double> <double 43.0, double 44.0, double 45.0>,
2228 <3 x double> <double 40.0, double 41.0, double 42.0>,
2229 metadata !"round.dynamic",
2230 metadata !"fpexcept.strict")
2231 ret <3 x double> %max
2234 define <4 x double> @constrained_vector_maxnum_v4f64() {
2235 ; CHECK-LABEL: constrained_vector_maxnum_v4f64:
2236 ; CHECK: # %bb.0: # %entry
2237 ; CHECK-NEXT: subq $40, %rsp
2238 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2239 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2240 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2241 ; CHECK-NEXT: callq fmax
2242 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2243 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2244 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2245 ; CHECK-NEXT: callq fmax
2246 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2247 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2248 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2249 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2250 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2251 ; CHECK-NEXT: callq fmax
2252 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2253 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2254 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2255 ; CHECK-NEXT: callq fmax
2256 ; CHECK-NEXT: movaps %xmm0, %xmm1
2257 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2258 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2259 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2260 ; CHECK-NEXT: addq $40, %rsp
2261 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2264 %max = call <4 x double> @llvm.experimental.constrained.maxnum.v4f64(
2265 <4 x double> <double 44.0, double 45.0,
2266 double 46.0, double 47.0>,
2267 <4 x double> <double 40.0, double 41.0,
2268 double 42.0, double 43.0>,
2269 metadata !"round.dynamic",
2270 metadata !"fpexcept.strict")
2271 ret <4 x double> %max
2274 define <1 x float> @constrained_vector_minnum_v1f32() {
2275 ; CHECK-LABEL: constrained_vector_minnum_v1f32:
2276 ; CHECK: # %bb.0: # %entry
2277 ; CHECK-NEXT: pushq %rax
2278 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2279 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2280 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2281 ; CHECK-NEXT: callq fminf
2282 ; CHECK-NEXT: popq %rax
2283 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2286 %min = call <1 x float> @llvm.experimental.constrained.minnum.v1f32(
2287 <1 x float> <float 42.0>, <1 x float> <float 41.0>,
2288 metadata !"round.dynamic",
2289 metadata !"fpexcept.strict")
2290 ret <1 x float> %min
2293 define <2 x double> @constrained_vector_minnum_v2f64() {
2294 ; CHECK-LABEL: constrained_vector_minnum_v2f64:
2295 ; CHECK: # %bb.0: # %entry
2296 ; CHECK-NEXT: subq $24, %rsp
2297 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2298 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2299 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2300 ; CHECK-NEXT: callq fmin
2301 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2302 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2303 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2304 ; CHECK-NEXT: callq fmin
2305 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2306 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2307 ; CHECK-NEXT: addq $24, %rsp
2308 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2311 %min = call <2 x double> @llvm.experimental.constrained.minnum.v2f64(
2312 <2 x double> <double 43.0, double 42.0>,
2313 <2 x double> <double 41.0, double 40.0>,
2314 metadata !"round.dynamic",
2315 metadata !"fpexcept.strict")
2316 ret <2 x double> %min
2319 define <3 x float> @constrained_vector_minnum_v3f32() {
2320 ; CHECK-LABEL: constrained_vector_minnum_v3f32:
2321 ; CHECK: # %bb.0: # %entry
2322 ; CHECK-NEXT: subq $40, %rsp
2323 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2324 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2325 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2326 ; CHECK-NEXT: callq fminf
2327 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2328 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2329 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2330 ; CHECK-NEXT: callq fminf
2331 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2332 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2333 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
2334 ; CHECK-NEXT: callq fminf
2335 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2336 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2337 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2338 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2339 ; CHECK-NEXT: movaps %xmm1, %xmm0
2340 ; CHECK-NEXT: addq $40, %rsp
2341 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2344 %min = call <3 x float> @llvm.experimental.constrained.minnum.v3f32(
2345 <3 x float> <float 43.0, float 44.0, float 45.0>,
2346 <3 x float> <float 41.0, float 42.0, float 43.0>,
2347 metadata !"round.dynamic",
2348 metadata !"fpexcept.strict")
2349 ret <3 x float> %min
2352 define <3 x double> @constrained_vector_min_v3f64() {
2353 ; CHECK-LABEL: constrained_vector_min_v3f64:
2354 ; CHECK: # %bb.0: # %entry
2355 ; CHECK-NEXT: subq $24, %rsp
2356 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2357 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2358 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2359 ; CHECK-NEXT: callq fmin
2360 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2361 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2362 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2363 ; CHECK-NEXT: callq fmin
2364 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2365 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2366 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2367 ; CHECK-NEXT: callq fmin
2368 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2369 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2370 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2371 ; CHECK-NEXT: # xmm0 = mem[0],zero
2372 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2373 ; CHECK-NEXT: # xmm1 = mem[0],zero
2374 ; CHECK-NEXT: addq $24, %rsp
2375 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2378 %min = call <3 x double> @llvm.experimental.constrained.minnum.v3f64(
2379 <3 x double> <double 43.0, double 44.0, double 45.0>,
2380 <3 x double> <double 40.0, double 41.0, double 42.0>,
2381 metadata !"round.dynamic",
2382 metadata !"fpexcept.strict")
2383 ret <3 x double> %min
2386 define <4 x double> @constrained_vector_minnum_v4f64() {
2387 ; CHECK-LABEL: constrained_vector_minnum_v4f64:
2388 ; CHECK: # %bb.0: # %entry
2389 ; CHECK-NEXT: subq $40, %rsp
2390 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2391 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2392 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2393 ; CHECK-NEXT: callq fmin
2394 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2395 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2396 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2397 ; CHECK-NEXT: callq fmin
2398 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2399 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2400 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2401 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2402 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2403 ; CHECK-NEXT: callq fmin
2404 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2405 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2406 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2407 ; CHECK-NEXT: callq fmin
2408 ; CHECK-NEXT: movaps %xmm0, %xmm1
2409 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2410 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2411 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
2412 ; CHECK-NEXT: addq $40, %rsp
2413 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2416 %min = call <4 x double> @llvm.experimental.constrained.minnum.v4f64(
2417 <4 x double> <double 44.0, double 45.0,
2418 double 46.0, double 47.0>,
2419 <4 x double> <double 40.0, double 41.0,
2420 double 42.0, double 43.0>,
2421 metadata !"round.dynamic",
2422 metadata !"fpexcept.strict")
2423 ret <4 x double> %min
2426 define <1 x float> @constrained_vector_ceil_v1f32() {
2427 ; CHECK-LABEL: constrained_vector_ceil_v1f32:
2428 ; CHECK: # %bb.0: # %entry
2429 ; CHECK-NEXT: pushq %rax
2430 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2431 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2432 ; CHECK-NEXT: callq ceilf
2433 ; CHECK-NEXT: popq %rax
2434 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2437 %ceil = call <1 x float> @llvm.experimental.constrained.ceil.v1f32(
2438 <1 x float> <float 1.5>,
2439 metadata !"round.dynamic",
2440 metadata !"fpexcept.strict")
2441 ret <1 x float> %ceil
2444 define <2 x double> @constrained_vector_ceil_v2f64() {
2445 ; CHECK-LABEL: constrained_vector_ceil_v2f64:
2446 ; CHECK: # %bb.0: # %entry
2447 ; CHECK-NEXT: subq $24, %rsp
2448 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2449 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2450 ; CHECK-NEXT: callq ceil
2451 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2452 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2453 ; CHECK-NEXT: callq ceil
2454 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2455 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2456 ; CHECK-NEXT: addq $24, %rsp
2457 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2460 %ceil = call <2 x double> @llvm.experimental.constrained.ceil.v2f64(
2461 <2 x double> <double 1.1, double 1.9>,
2462 metadata !"round.dynamic",
2463 metadata !"fpexcept.strict")
2464 ret <2 x double> %ceil
2467 define <3 x float> @constrained_vector_ceil_v3f32() {
2468 ; CHECK-LABEL: constrained_vector_ceil_v3f32:
2469 ; CHECK: # %bb.0: # %entry
2470 ; CHECK-NEXT: subq $40, %rsp
2471 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2472 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2473 ; CHECK-NEXT: callq ceilf
2474 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2475 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2476 ; CHECK-NEXT: callq ceilf
2477 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2478 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2479 ; CHECK-NEXT: callq ceilf
2480 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2481 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2482 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2483 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2484 ; CHECK-NEXT: movaps %xmm1, %xmm0
2485 ; CHECK-NEXT: addq $40, %rsp
2486 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2489 %ceil = call <3 x float> @llvm.experimental.constrained.ceil.v3f32(
2490 <3 x float> <float 1.5, float 2.5, float 3.5>,
2491 metadata !"round.dynamic",
2492 metadata !"fpexcept.strict")
2493 ret <3 x float> %ceil
2496 define <3 x double> @constrained_vector_ceil_v3f64() {
2497 ; CHECK-LABEL: constrained_vector_ceil_v3f64:
2498 ; CHECK: # %bb.0: # %entry
2499 ; CHECK-NEXT: subq $24, %rsp
2500 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2501 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2502 ; CHECK-NEXT: callq ceil
2503 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2504 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2505 ; CHECK-NEXT: callq ceil
2506 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2507 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2508 ; CHECK-NEXT: callq ceil
2509 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2510 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2511 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2512 ; CHECK-NEXT: # xmm0 = mem[0],zero
2513 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2514 ; CHECK-NEXT: # xmm1 = mem[0],zero
2515 ; CHECK-NEXT: addq $24, %rsp
2516 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2519 %ceil = call <3 x double> @llvm.experimental.constrained.ceil.v3f64(
2520 <3 x double> <double 1.1, double 1.9, double 1.5>,
2521 metadata !"round.dynamic",
2522 metadata !"fpexcept.strict")
2523 ret <3 x double> %ceil
2526 define <1 x float> @constrained_vector_floor_v1f32() {
2527 ; CHECK-LABEL: constrained_vector_floor_v1f32:
2528 ; CHECK: # %bb.0: # %entry
2529 ; CHECK-NEXT: pushq %rax
2530 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2531 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2532 ; CHECK-NEXT: callq floorf
2533 ; CHECK-NEXT: popq %rax
2534 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2537 %floor = call <1 x float> @llvm.experimental.constrained.floor.v1f32(
2538 <1 x float> <float 1.5>,
2539 metadata !"round.dynamic",
2540 metadata !"fpexcept.strict")
2541 ret <1 x float> %floor
2545 define <2 x double> @constrained_vector_floor_v2f64() {
2546 ; CHECK-LABEL: constrained_vector_floor_v2f64:
2547 ; CHECK: # %bb.0: # %entry
2548 ; CHECK-NEXT: subq $24, %rsp
2549 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2550 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2551 ; CHECK-NEXT: callq floor
2552 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2553 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2554 ; CHECK-NEXT: callq floor
2555 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2556 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2557 ; CHECK-NEXT: addq $24, %rsp
2558 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2561 %floor = call <2 x double> @llvm.experimental.constrained.floor.v2f64(
2562 <2 x double> <double 1.1, double 1.9>,
2563 metadata !"round.dynamic",
2564 metadata !"fpexcept.strict")
2565 ret <2 x double> %floor
2568 define <3 x float> @constrained_vector_floor_v3f32() {
2569 ; CHECK-LABEL: constrained_vector_floor_v3f32:
2570 ; CHECK: # %bb.0: # %entry
2571 ; CHECK-NEXT: subq $40, %rsp
2572 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2573 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2574 ; CHECK-NEXT: callq floorf
2575 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2576 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2577 ; CHECK-NEXT: callq floorf
2578 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2579 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2580 ; CHECK-NEXT: callq floorf
2581 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2582 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2583 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2584 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2585 ; CHECK-NEXT: movaps %xmm1, %xmm0
2586 ; CHECK-NEXT: addq $40, %rsp
2587 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2590 %floor = call <3 x float> @llvm.experimental.constrained.floor.v3f32(
2591 <3 x float> <float 1.5, float 2.5, float 3.5>,
2592 metadata !"round.dynamic",
2593 metadata !"fpexcept.strict")
2594 ret <3 x float> %floor
2597 define <3 x double> @constrained_vector_floor_v3f64() {
2598 ; CHECK-LABEL: constrained_vector_floor_v3f64:
2599 ; CHECK: # %bb.0: # %entry
2600 ; CHECK-NEXT: subq $24, %rsp
2601 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2602 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2603 ; CHECK-NEXT: callq floor
2604 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2605 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2606 ; CHECK-NEXT: callq floor
2607 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2608 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2609 ; CHECK-NEXT: callq floor
2610 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2611 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2612 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2613 ; CHECK-NEXT: # xmm0 = mem[0],zero
2614 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2615 ; CHECK-NEXT: # xmm1 = mem[0],zero
2616 ; CHECK-NEXT: addq $24, %rsp
2617 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2620 %floor = call <3 x double> @llvm.experimental.constrained.floor.v3f64(
2621 <3 x double> <double 1.1, double 1.9, double 1.5>,
2622 metadata !"round.dynamic",
2623 metadata !"fpexcept.strict")
2624 ret <3 x double> %floor
2627 define <1 x float> @constrained_vector_round_v1f32() {
2628 ; CHECK-LABEL: constrained_vector_round_v1f32:
2629 ; CHECK: # %bb.0: # %entry
2630 ; CHECK-NEXT: pushq %rax
2631 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2632 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2633 ; CHECK-NEXT: callq roundf
2634 ; CHECK-NEXT: popq %rax
2635 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2638 %round = call <1 x float> @llvm.experimental.constrained.round.v1f32(
2639 <1 x float> <float 1.5>,
2640 metadata !"round.dynamic",
2641 metadata !"fpexcept.strict")
2642 ret <1 x float> %round
2645 define <2 x double> @constrained_vector_round_v2f64() {
2646 ; CHECK-LABEL: constrained_vector_round_v2f64:
2647 ; CHECK: # %bb.0: # %entry
2648 ; CHECK-NEXT: subq $24, %rsp
2649 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2650 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2651 ; CHECK-NEXT: callq round
2652 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2653 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2654 ; CHECK-NEXT: callq round
2655 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2656 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2657 ; CHECK-NEXT: addq $24, %rsp
2658 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2661 %round = call <2 x double> @llvm.experimental.constrained.round.v2f64(
2662 <2 x double> <double 1.1, double 1.9>,
2663 metadata !"round.dynamic",
2664 metadata !"fpexcept.strict")
2665 ret <2 x double> %round
2668 define <3 x float> @constrained_vector_round_v3f32() {
2669 ; CHECK-LABEL: constrained_vector_round_v3f32:
2670 ; CHECK: # %bb.0: # %entry
2671 ; CHECK-NEXT: subq $40, %rsp
2672 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2673 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2674 ; CHECK-NEXT: callq roundf
2675 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2676 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2677 ; CHECK-NEXT: callq roundf
2678 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2679 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2680 ; CHECK-NEXT: callq roundf
2681 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2682 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2683 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2684 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2685 ; CHECK-NEXT: movaps %xmm1, %xmm0
2686 ; CHECK-NEXT: addq $40, %rsp
2687 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2690 %round = call <3 x float> @llvm.experimental.constrained.round.v3f32(
2691 <3 x float> <float 1.5, float 2.5, float 3.5>,
2692 metadata !"round.dynamic",
2693 metadata !"fpexcept.strict")
2694 ret <3 x float> %round
2698 define <3 x double> @constrained_vector_round_v3f64() {
2699 ; CHECK-LABEL: constrained_vector_round_v3f64:
2700 ; CHECK: # %bb.0: # %entry
2701 ; CHECK-NEXT: subq $24, %rsp
2702 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2703 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2704 ; CHECK-NEXT: callq round
2705 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2706 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2707 ; CHECK-NEXT: callq round
2708 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2709 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2710 ; CHECK-NEXT: callq round
2711 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2712 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2713 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2714 ; CHECK-NEXT: # xmm0 = mem[0],zero
2715 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2716 ; CHECK-NEXT: # xmm1 = mem[0],zero
2717 ; CHECK-NEXT: addq $24, %rsp
2718 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2721 %round = call <3 x double> @llvm.experimental.constrained.round.v3f64(
2722 <3 x double> <double 1.1, double 1.9, double 1.5>,
2723 metadata !"round.dynamic",
2724 metadata !"fpexcept.strict")
2725 ret <3 x double> %round
2728 define <1 x float> @constrained_vector_trunc_v1f32() {
2729 ; CHECK-LABEL: constrained_vector_trunc_v1f32:
2730 ; CHECK: # %bb.0: # %entry
2731 ; CHECK-NEXT: pushq %rax
2732 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2733 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2734 ; CHECK-NEXT: callq truncf
2735 ; CHECK-NEXT: popq %rax
2736 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2739 %trunc = call <1 x float> @llvm.experimental.constrained.trunc.v1f32(
2740 <1 x float> <float 1.5>,
2741 metadata !"round.dynamic",
2742 metadata !"fpexcept.strict")
2743 ret <1 x float> %trunc
2746 define <2 x double> @constrained_vector_trunc_v2f64() {
2747 ; CHECK-LABEL: constrained_vector_trunc_v2f64:
2748 ; CHECK: # %bb.0: # %entry
2749 ; CHECK-NEXT: subq $24, %rsp
2750 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2751 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2752 ; CHECK-NEXT: callq trunc
2753 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2754 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2755 ; CHECK-NEXT: callq trunc
2756 ; CHECK-NEXT: unpcklpd (%rsp), %xmm0 # 16-byte Folded Reload
2757 ; CHECK-NEXT: # xmm0 = xmm0[0],mem[0]
2758 ; CHECK-NEXT: addq $24, %rsp
2759 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2762 %trunc = call <2 x double> @llvm.experimental.constrained.trunc.v2f64(
2763 <2 x double> <double 1.1, double 1.9>,
2764 metadata !"round.dynamic",
2765 metadata !"fpexcept.strict")
2766 ret <2 x double> %trunc
2769 define <3 x float> @constrained_vector_trunc_v3f32() {
2770 ; CHECK-LABEL: constrained_vector_trunc_v3f32:
2771 ; CHECK: # %bb.0: # %entry
2772 ; CHECK-NEXT: subq $40, %rsp
2773 ; CHECK-NEXT: .cfi_def_cfa_offset 48
2774 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2775 ; CHECK-NEXT: callq truncf
2776 ; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
2777 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2778 ; CHECK-NEXT: callq truncf
2779 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
2780 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2781 ; CHECK-NEXT: callq truncf
2782 ; CHECK-NEXT: movaps (%rsp), %xmm1 # 16-byte Reload
2783 ; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2784 ; CHECK-NEXT: unpcklpd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
2785 ; CHECK-NEXT: # xmm1 = xmm1[0],mem[0]
2786 ; CHECK-NEXT: movaps %xmm1, %xmm0
2787 ; CHECK-NEXT: addq $40, %rsp
2788 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2791 %trunc = call <3 x float> @llvm.experimental.constrained.trunc.v3f32(
2792 <3 x float> <float 1.5, float 2.5, float 3.5>,
2793 metadata !"round.dynamic",
2794 metadata !"fpexcept.strict")
2795 ret <3 x float> %trunc
2798 define <3 x double> @constrained_vector_trunc_v3f64() {
2799 ; CHECK-LABEL: constrained_vector_trunc_v3f64:
2800 ; CHECK: # %bb.0: # %entry
2801 ; CHECK-NEXT: subq $24, %rsp
2802 ; CHECK-NEXT: .cfi_def_cfa_offset 32
2803 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2804 ; CHECK-NEXT: callq trunc
2805 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
2806 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2807 ; CHECK-NEXT: callq trunc
2808 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
2809 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2810 ; CHECK-NEXT: callq trunc
2811 ; CHECK-NEXT: movsd %xmm0, {{[0-9]+}}(%rsp)
2812 ; CHECK-NEXT: fldl {{[0-9]+}}(%rsp)
2813 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
2814 ; CHECK-NEXT: # xmm0 = mem[0],zero
2815 ; CHECK-NEXT: movsd (%rsp), %xmm1 # 8-byte Reload
2816 ; CHECK-NEXT: # xmm1 = mem[0],zero
2817 ; CHECK-NEXT: addq $24, %rsp
2818 ; CHECK-NEXT: .cfi_def_cfa_offset 8
2821 %trunc = call <3 x double> @llvm.experimental.constrained.trunc.v3f64(
2822 <3 x double> <double 1.1, double 1.9, double 1.5>,
2823 metadata !"round.dynamic",
2824 metadata !"fpexcept.strict")
2825 ret <3 x double> %trunc
2829 ; Single width declarations
2830 declare <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2831 declare <2 x double> @llvm.experimental.constrained.fsub.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2832 declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2833 declare <2 x double> @llvm.experimental.constrained.fdiv.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2834 declare <2 x double> @llvm.experimental.constrained.frem.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2835 declare <2 x double> @llvm.experimental.constrained.sqrt.v2f64(<2 x double>, metadata, metadata)
2836 declare <2 x double> @llvm.experimental.constrained.pow.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2837 declare <2 x double> @llvm.experimental.constrained.powi.v2f64(<2 x double>, i32, metadata, metadata)
2838 declare <2 x double> @llvm.experimental.constrained.sin.v2f64(<2 x double>, metadata, metadata)
2839 declare <2 x double> @llvm.experimental.constrained.cos.v2f64(<2 x double>, metadata, metadata)
2840 declare <2 x double> @llvm.experimental.constrained.exp.v2f64(<2 x double>, metadata, metadata)
2841 declare <2 x double> @llvm.experimental.constrained.exp2.v2f64(<2 x double>, metadata, metadata)
2842 declare <2 x double> @llvm.experimental.constrained.log.v2f64(<2 x double>, metadata, metadata)
2843 declare <2 x double> @llvm.experimental.constrained.log10.v2f64(<2 x double>, metadata, metadata)
2844 declare <2 x double> @llvm.experimental.constrained.log2.v2f64(<2 x double>, metadata, metadata)
2845 declare <2 x double> @llvm.experimental.constrained.rint.v2f64(<2 x double>, metadata, metadata)
2846 declare <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(<2 x double>, metadata, metadata)
2847 declare <2 x double> @llvm.experimental.constrained.maxnum.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2848 declare <2 x double> @llvm.experimental.constrained.minnum.v2f64(<2 x double>, <2 x double>, metadata, metadata)
2849 declare <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>, metadata, metadata)
2850 declare <2 x double> @llvm.experimental.constrained.floor.v2f64(<2 x double>, metadata, metadata)
2851 declare <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>, metadata, metadata)
2852 declare <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>, metadata, metadata)
2854 ; Scalar width declarations
2855 declare <1 x float> @llvm.experimental.constrained.fadd.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2856 declare <1 x float> @llvm.experimental.constrained.fsub.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2857 declare <1 x float> @llvm.experimental.constrained.fmul.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2858 declare <1 x float> @llvm.experimental.constrained.fdiv.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2859 declare <1 x float> @llvm.experimental.constrained.frem.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2860 declare <1 x float> @llvm.experimental.constrained.sqrt.v1f32(<1 x float>, metadata, metadata)
2861 declare <1 x float> @llvm.experimental.constrained.pow.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2862 declare <1 x float> @llvm.experimental.constrained.powi.v1f32(<1 x float>, i32, metadata, metadata)
2863 declare <1 x float> @llvm.experimental.constrained.sin.v1f32(<1 x float>, metadata, metadata)
2864 declare <1 x float> @llvm.experimental.constrained.cos.v1f32(<1 x float>, metadata, metadata)
2865 declare <1 x float> @llvm.experimental.constrained.exp.v1f32(<1 x float>, metadata, metadata)
2866 declare <1 x float> @llvm.experimental.constrained.exp2.v1f32(<1 x float>, metadata, metadata)
2867 declare <1 x float> @llvm.experimental.constrained.log.v1f32(<1 x float>, metadata, metadata)
2868 declare <1 x float> @llvm.experimental.constrained.log10.v1f32(<1 x float>, metadata, metadata)
2869 declare <1 x float> @llvm.experimental.constrained.log2.v1f32(<1 x float>, metadata, metadata)
2870 declare <1 x float> @llvm.experimental.constrained.rint.v1f32(<1 x float>, metadata, metadata)
2871 declare <1 x float> @llvm.experimental.constrained.nearbyint.v1f32(<1 x float>, metadata, metadata)
2872 declare <1 x float> @llvm.experimental.constrained.maxnum.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2873 declare <1 x float> @llvm.experimental.constrained.minnum.v1f32(<1 x float>, <1 x float>, metadata, metadata)
2874 declare <1 x float> @llvm.experimental.constrained.ceil.v1f32(<1 x float>, metadata, metadata)
2875 declare <1 x float> @llvm.experimental.constrained.floor.v1f32(<1 x float>, metadata, metadata)
2876 declare <1 x float> @llvm.experimental.constrained.round.v1f32(<1 x float>, metadata, metadata)
2877 declare <1 x float> @llvm.experimental.constrained.trunc.v1f32(<1 x float>, metadata, metadata)
2879 ; Illegal width declarations
2880 declare <3 x float> @llvm.experimental.constrained.fadd.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2881 declare <3 x double> @llvm.experimental.constrained.fadd.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2882 declare <3 x float> @llvm.experimental.constrained.fsub.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2883 declare <3 x double> @llvm.experimental.constrained.fsub.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2884 declare <3 x float> @llvm.experimental.constrained.fmul.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2885 declare <3 x double> @llvm.experimental.constrained.fmul.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2886 declare <3 x float> @llvm.experimental.constrained.fdiv.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2887 declare <3 x double> @llvm.experimental.constrained.fdiv.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2888 declare <3 x float> @llvm.experimental.constrained.frem.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2889 declare <3 x double> @llvm.experimental.constrained.frem.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2890 declare <3 x float> @llvm.experimental.constrained.sqrt.v3f32(<3 x float>, metadata, metadata)
2891 declare <3 x double> @llvm.experimental.constrained.sqrt.v3f64(<3 x double>, metadata, metadata)
2892 declare <3 x float> @llvm.experimental.constrained.pow.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2893 declare <3 x double> @llvm.experimental.constrained.pow.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2894 declare <3 x float> @llvm.experimental.constrained.powi.v3f32(<3 x float>, i32, metadata, metadata)
2895 declare <3 x double> @llvm.experimental.constrained.powi.v3f64(<3 x double>, i32, metadata, metadata)
2896 declare <3 x float> @llvm.experimental.constrained.sin.v3f32(<3 x float>, metadata, metadata)
2897 declare <3 x double> @llvm.experimental.constrained.sin.v3f64(<3 x double>, metadata, metadata)
2898 declare <3 x float> @llvm.experimental.constrained.cos.v3f32(<3 x float>, metadata, metadata)
2899 declare <3 x double> @llvm.experimental.constrained.cos.v3f64(<3 x double>, metadata, metadata)
2900 declare <3 x float> @llvm.experimental.constrained.exp.v3f32(<3 x float>, metadata, metadata)
2901 declare <3 x double> @llvm.experimental.constrained.exp.v3f64(<3 x double>, metadata, metadata)
2902 declare <3 x float> @llvm.experimental.constrained.exp2.v3f32(<3 x float>, metadata, metadata)
2903 declare <3 x double> @llvm.experimental.constrained.exp2.v3f64(<3 x double>, metadata, metadata)
2904 declare <3 x float> @llvm.experimental.constrained.log.v3f32(<3 x float>, metadata, metadata)
2905 declare <3 x double> @llvm.experimental.constrained.log.v3f64(<3 x double>, metadata, metadata)
2906 declare <3 x float> @llvm.experimental.constrained.log10.v3f32(<3 x float>, metadata, metadata)
2907 declare <3 x double> @llvm.experimental.constrained.log10.v3f64(<3 x double>, metadata, metadata)
2908 declare <3 x float> @llvm.experimental.constrained.log2.v3f32(<3 x float>, metadata, metadata)
2909 declare <3 x double> @llvm.experimental.constrained.log2.v3f64(<3 x double>, metadata, metadata)
2910 declare <3 x float> @llvm.experimental.constrained.rint.v3f32(<3 x float>, metadata, metadata)
2911 declare <3 x double> @llvm.experimental.constrained.rint.v3f64(<3 x double>, metadata, metadata)
2912 declare <3 x float> @llvm.experimental.constrained.nearbyint.v3f32(<3 x float>, metadata, metadata)
2913 declare <3 x double> @llvm.experimental.constrained.nearbyint.v3f64(<3 x double>, metadata, metadata)
2914 declare <3 x float> @llvm.experimental.constrained.maxnum.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2915 declare <3 x double> @llvm.experimental.constrained.maxnum.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2916 declare <3 x float> @llvm.experimental.constrained.minnum.v3f32(<3 x float>, <3 x float>, metadata, metadata)
2917 declare <3 x double> @llvm.experimental.constrained.minnum.v3f64(<3 x double>, <3 x double>, metadata, metadata)
2918 declare <3 x float> @llvm.experimental.constrained.ceil.v3f32(<3 x float>, metadata, metadata)
2919 declare <3 x double> @llvm.experimental.constrained.ceil.v3f64(<3 x double>, metadata, metadata)
2920 declare <3 x float> @llvm.experimental.constrained.floor.v3f32(<3 x float>, metadata, metadata)
2921 declare <3 x double> @llvm.experimental.constrained.floor.v3f64(<3 x double>, metadata, metadata)
2922 declare <3 x float> @llvm.experimental.constrained.round.v3f32(<3 x float>, metadata, metadata)
2923 declare <3 x double> @llvm.experimental.constrained.round.v3f64(<3 x double>, metadata, metadata)
2924 declare <3 x float> @llvm.experimental.constrained.trunc.v3f32(<3 x float>, metadata, metadata)
2925 declare <3 x double> @llvm.experimental.constrained.trunc.v3f64(<3 x double>, metadata, metadata)
2927 ; Double width declarations
2928 declare <4 x double> @llvm.experimental.constrained.fadd.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2929 declare <4 x double> @llvm.experimental.constrained.fsub.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2930 declare <4 x double> @llvm.experimental.constrained.fmul.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2931 declare <4 x double> @llvm.experimental.constrained.fdiv.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2932 declare <4 x double> @llvm.experimental.constrained.frem.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2933 declare <4 x double> @llvm.experimental.constrained.sqrt.v4f64(<4 x double>, metadata, metadata)
2934 declare <4 x double> @llvm.experimental.constrained.pow.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2935 declare <4 x double> @llvm.experimental.constrained.powi.v4f64(<4 x double>, i32, metadata, metadata)
2936 declare <4 x double> @llvm.experimental.constrained.sin.v4f64(<4 x double>, metadata, metadata)
2937 declare <4 x double> @llvm.experimental.constrained.cos.v4f64(<4 x double>, metadata, metadata)
2938 declare <4 x double> @llvm.experimental.constrained.exp.v4f64(<4 x double>, metadata, metadata)
2939 declare <4 x double> @llvm.experimental.constrained.exp2.v4f64(<4 x double>, metadata, metadata)
2940 declare <4 x double> @llvm.experimental.constrained.log.v4f64(<4 x double>, metadata, metadata)
2941 declare <4 x double> @llvm.experimental.constrained.log10.v4f64(<4 x double>, metadata, metadata)
2942 declare <4 x double> @llvm.experimental.constrained.log2.v4f64(<4 x double>, metadata, metadata)
2943 declare <4 x double> @llvm.experimental.constrained.rint.v4f64(<4 x double>, metadata, metadata)
2944 declare <4 x double> @llvm.experimental.constrained.nearbyint.v4f64(<4 x double>, metadata, metadata)
2945 declare <4 x double> @llvm.experimental.constrained.maxnum.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2946 declare <4 x double> @llvm.experimental.constrained.minnum.v4f64(<4 x double>, <4 x double>, metadata, metadata)
2947 declare <4 x double> @llvm.experimental.constrained.ceil.v4f64(<4 x double>, metadata, metadata)
2948 declare <4 x double> @llvm.experimental.constrained.floor.v4f64(<4 x double>, metadata, metadata)
2949 declare <4 x double> @llvm.experimental.constrained.round.v4f64(<4 x double>, metadata, metadata)
2950 declare <4 x double> @llvm.experimental.constrained.trunc.v4f64(<4 x double>, metadata, metadata)