1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -O2 -mtriple=x86_64-linux-android \
3 ; RUN: -enable-legalize-types-checking \
5 ; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu \
6 ; RUN: -enable-legalize-types-checking \
8 ; RUN: llc < %s -O2 -mtriple=i686-linux-gnu -mattr=+sse2 \
9 ; RUN: -enable-legalize-types-checking \
10 ; RUN: | FileCheck %s --check-prefix=X86
12 ; Check all soft floating point library function calls.
14 define fp128 @add(fp128 %x, fp128 %y) nounwind strictfp {
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: pushq %rax
18 ; CHECK-NEXT: callq __addtf3@PLT
19 ; CHECK-NEXT: popq %rax
23 ; X86: # %bb.0: # %entry
24 ; X86-NEXT: pushl %esi
25 ; X86-NEXT: subl $24, %esp
26 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
27 ; X86-NEXT: subl $12, %esp
28 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
29 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
30 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
31 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
32 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
33 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
34 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
35 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
36 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
37 ; X86-NEXT: pushl %eax
38 ; X86-NEXT: calll __addtf3
39 ; X86-NEXT: addl $44, %esp
40 ; X86-NEXT: movaps (%esp), %xmm0
41 ; X86-NEXT: movaps %xmm0, (%esi)
42 ; X86-NEXT: movl %esi, %eax
43 ; X86-NEXT: addl $24, %esp
47 %add = call fp128 @llvm.experimental.constrained.fadd.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
51 define fp128 @sub(fp128 %x, fp128 %y) nounwind strictfp {
53 ; CHECK: # %bb.0: # %entry
54 ; CHECK-NEXT: pushq %rax
55 ; CHECK-NEXT: callq __subtf3@PLT
56 ; CHECK-NEXT: popq %rax
60 ; X86: # %bb.0: # %entry
61 ; X86-NEXT: pushl %esi
62 ; X86-NEXT: subl $24, %esp
63 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
64 ; X86-NEXT: subl $12, %esp
65 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
66 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
67 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
68 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
69 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
70 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
71 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
72 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
73 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
74 ; X86-NEXT: pushl %eax
75 ; X86-NEXT: calll __subtf3
76 ; X86-NEXT: addl $44, %esp
77 ; X86-NEXT: movaps (%esp), %xmm0
78 ; X86-NEXT: movaps %xmm0, (%esi)
79 ; X86-NEXT: movl %esi, %eax
80 ; X86-NEXT: addl $24, %esp
84 %sub = call fp128 @llvm.experimental.constrained.fsub.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
88 define fp128 @mul(fp128 %x, fp128 %y) nounwind strictfp {
90 ; CHECK: # %bb.0: # %entry
91 ; CHECK-NEXT: pushq %rax
92 ; CHECK-NEXT: callq __multf3@PLT
93 ; CHECK-NEXT: popq %rax
97 ; X86: # %bb.0: # %entry
98 ; X86-NEXT: pushl %esi
99 ; X86-NEXT: subl $24, %esp
100 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
101 ; X86-NEXT: subl $12, %esp
102 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
103 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
104 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
105 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
106 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
107 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
108 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
109 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
110 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
111 ; X86-NEXT: pushl %eax
112 ; X86-NEXT: calll __multf3
113 ; X86-NEXT: addl $44, %esp
114 ; X86-NEXT: movaps (%esp), %xmm0
115 ; X86-NEXT: movaps %xmm0, (%esi)
116 ; X86-NEXT: movl %esi, %eax
117 ; X86-NEXT: addl $24, %esp
118 ; X86-NEXT: popl %esi
121 %mul = call fp128 @llvm.experimental.constrained.fmul.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
125 define fp128 @div(fp128 %x, fp128 %y) nounwind strictfp {
127 ; CHECK: # %bb.0: # %entry
128 ; CHECK-NEXT: pushq %rax
129 ; CHECK-NEXT: callq __divtf3@PLT
130 ; CHECK-NEXT: popq %rax
134 ; X86: # %bb.0: # %entry
135 ; X86-NEXT: pushl %esi
136 ; X86-NEXT: subl $24, %esp
137 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
138 ; X86-NEXT: subl $12, %esp
139 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
140 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
141 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
142 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
143 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
144 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
145 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
146 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
147 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
148 ; X86-NEXT: pushl %eax
149 ; X86-NEXT: calll __divtf3
150 ; X86-NEXT: addl $44, %esp
151 ; X86-NEXT: movaps (%esp), %xmm0
152 ; X86-NEXT: movaps %xmm0, (%esi)
153 ; X86-NEXT: movl %esi, %eax
154 ; X86-NEXT: addl $24, %esp
155 ; X86-NEXT: popl %esi
158 %div = call fp128 @llvm.experimental.constrained.fdiv.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
162 define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
164 ; CHECK: # %bb.0: # %entry
165 ; CHECK-NEXT: pushq %rax
166 ; CHECK-NEXT: callq fmal@PLT
167 ; CHECK-NEXT: popq %rax
171 ; X86: # %bb.0: # %entry
172 ; X86-NEXT: pushl %esi
173 ; X86-NEXT: subl $24, %esp
174 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
175 ; X86-NEXT: subl $12, %esp
176 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
177 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
178 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
179 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
180 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
181 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
182 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
183 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
184 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
185 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
186 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
187 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
188 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
189 ; X86-NEXT: pushl %eax
190 ; X86-NEXT: calll fmal
191 ; X86-NEXT: addl $60, %esp
192 ; X86-NEXT: movaps (%esp), %xmm0
193 ; X86-NEXT: movaps %xmm0, (%esi)
194 ; X86-NEXT: movl %esi, %eax
195 ; X86-NEXT: addl $24, %esp
196 ; X86-NEXT: popl %esi
199 %fma = call fp128 @llvm.experimental.constrained.fma.f128(fp128 %x, fp128 %y, fp128 %z, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
203 define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
205 ; CHECK: # %bb.0: # %entry
206 ; CHECK-NEXT: pushq %rax
207 ; CHECK-NEXT: callq fmodl@PLT
208 ; CHECK-NEXT: popq %rax
212 ; X86: # %bb.0: # %entry
213 ; X86-NEXT: pushl %esi
214 ; X86-NEXT: subl $24, %esp
215 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
216 ; X86-NEXT: subl $12, %esp
217 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
218 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
219 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
220 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
221 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
222 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
223 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
224 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
225 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
226 ; X86-NEXT: pushl %eax
227 ; X86-NEXT: calll fmodl
228 ; X86-NEXT: addl $44, %esp
229 ; X86-NEXT: movaps (%esp), %xmm0
230 ; X86-NEXT: movaps %xmm0, (%esi)
231 ; X86-NEXT: movl %esi, %eax
232 ; X86-NEXT: addl $24, %esp
233 ; X86-NEXT: popl %esi
236 %div = call fp128 @llvm.experimental.constrained.frem.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
240 define fp128 @ceil(fp128 %x) nounwind strictfp {
242 ; CHECK: # %bb.0: # %entry
243 ; CHECK-NEXT: pushq %rax
244 ; CHECK-NEXT: callq ceill@PLT
245 ; CHECK-NEXT: popq %rax
249 ; X86: # %bb.0: # %entry
250 ; X86-NEXT: pushl %esi
251 ; X86-NEXT: subl $24, %esp
252 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
253 ; X86-NEXT: subl $12, %esp
254 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
255 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
256 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
257 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
258 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
259 ; X86-NEXT: pushl %eax
260 ; X86-NEXT: calll ceill
261 ; X86-NEXT: addl $28, %esp
262 ; X86-NEXT: movaps (%esp), %xmm0
263 ; X86-NEXT: movaps %xmm0, (%esi)
264 ; X86-NEXT: movl %esi, %eax
265 ; X86-NEXT: addl $24, %esp
266 ; X86-NEXT: popl %esi
269 %ceil = call fp128 @llvm.experimental.constrained.ceil.f128(fp128 %x, metadata !"fpexcept.strict") #0
273 define fp128 @cos(fp128 %x) nounwind strictfp {
275 ; CHECK: # %bb.0: # %entry
276 ; CHECK-NEXT: pushq %rax
277 ; CHECK-NEXT: callq cosl@PLT
278 ; CHECK-NEXT: popq %rax
282 ; X86: # %bb.0: # %entry
283 ; X86-NEXT: pushl %esi
284 ; X86-NEXT: subl $24, %esp
285 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
286 ; X86-NEXT: subl $12, %esp
287 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
288 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
289 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
290 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
291 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
292 ; X86-NEXT: pushl %eax
293 ; X86-NEXT: calll cosl
294 ; X86-NEXT: addl $28, %esp
295 ; X86-NEXT: movaps (%esp), %xmm0
296 ; X86-NEXT: movaps %xmm0, (%esi)
297 ; X86-NEXT: movl %esi, %eax
298 ; X86-NEXT: addl $24, %esp
299 ; X86-NEXT: popl %esi
302 %cos = call fp128 @llvm.experimental.constrained.cos.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
306 define fp128 @exp(fp128 %x) nounwind strictfp {
308 ; CHECK: # %bb.0: # %entry
309 ; CHECK-NEXT: pushq %rax
310 ; CHECK-NEXT: callq expl@PLT
311 ; CHECK-NEXT: popq %rax
315 ; X86: # %bb.0: # %entry
316 ; X86-NEXT: pushl %esi
317 ; X86-NEXT: subl $24, %esp
318 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
319 ; X86-NEXT: subl $12, %esp
320 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
321 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
322 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
323 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
324 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
325 ; X86-NEXT: pushl %eax
326 ; X86-NEXT: calll expl
327 ; X86-NEXT: addl $28, %esp
328 ; X86-NEXT: movaps (%esp), %xmm0
329 ; X86-NEXT: movaps %xmm0, (%esi)
330 ; X86-NEXT: movl %esi, %eax
331 ; X86-NEXT: addl $24, %esp
332 ; X86-NEXT: popl %esi
335 %exp = call fp128 @llvm.experimental.constrained.exp.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
339 define fp128 @exp2(fp128 %x) nounwind strictfp {
341 ; CHECK: # %bb.0: # %entry
342 ; CHECK-NEXT: pushq %rax
343 ; CHECK-NEXT: callq exp2l@PLT
344 ; CHECK-NEXT: popq %rax
348 ; X86: # %bb.0: # %entry
349 ; X86-NEXT: pushl %esi
350 ; X86-NEXT: subl $24, %esp
351 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
352 ; X86-NEXT: subl $12, %esp
353 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
354 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
355 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
356 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
357 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
358 ; X86-NEXT: pushl %eax
359 ; X86-NEXT: calll exp2l
360 ; X86-NEXT: addl $28, %esp
361 ; X86-NEXT: movaps (%esp), %xmm0
362 ; X86-NEXT: movaps %xmm0, (%esi)
363 ; X86-NEXT: movl %esi, %eax
364 ; X86-NEXT: addl $24, %esp
365 ; X86-NEXT: popl %esi
368 %exp2 = call fp128 @llvm.experimental.constrained.exp2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
372 define fp128 @floor(fp128 %x) nounwind strictfp {
373 ; CHECK-LABEL: floor:
374 ; CHECK: # %bb.0: # %entry
375 ; CHECK-NEXT: pushq %rax
376 ; CHECK-NEXT: callq floorl@PLT
377 ; CHECK-NEXT: popq %rax
381 ; X86: # %bb.0: # %entry
382 ; X86-NEXT: pushl %esi
383 ; X86-NEXT: subl $24, %esp
384 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
385 ; X86-NEXT: subl $12, %esp
386 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
387 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
388 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
389 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
390 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
391 ; X86-NEXT: pushl %eax
392 ; X86-NEXT: calll floorl
393 ; X86-NEXT: addl $28, %esp
394 ; X86-NEXT: movaps (%esp), %xmm0
395 ; X86-NEXT: movaps %xmm0, (%esi)
396 ; X86-NEXT: movl %esi, %eax
397 ; X86-NEXT: addl $24, %esp
398 ; X86-NEXT: popl %esi
401 %floor = call fp128 @llvm.experimental.constrained.floor.f128(fp128 %x, metadata !"fpexcept.strict") #0
405 define fp128 @log(fp128 %x) nounwind strictfp {
407 ; CHECK: # %bb.0: # %entry
408 ; CHECK-NEXT: pushq %rax
409 ; CHECK-NEXT: callq logl@PLT
410 ; CHECK-NEXT: popq %rax
414 ; X86: # %bb.0: # %entry
415 ; X86-NEXT: pushl %esi
416 ; X86-NEXT: subl $24, %esp
417 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
418 ; X86-NEXT: subl $12, %esp
419 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
420 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
421 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
422 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
423 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
424 ; X86-NEXT: pushl %eax
425 ; X86-NEXT: calll logl
426 ; X86-NEXT: addl $28, %esp
427 ; X86-NEXT: movaps (%esp), %xmm0
428 ; X86-NEXT: movaps %xmm0, (%esi)
429 ; X86-NEXT: movl %esi, %eax
430 ; X86-NEXT: addl $24, %esp
431 ; X86-NEXT: popl %esi
434 %log = call fp128 @llvm.experimental.constrained.log.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
438 define fp128 @log10(fp128 %x) nounwind strictfp {
439 ; CHECK-LABEL: log10:
440 ; CHECK: # %bb.0: # %entry
441 ; CHECK-NEXT: pushq %rax
442 ; CHECK-NEXT: callq log10l@PLT
443 ; CHECK-NEXT: popq %rax
447 ; X86: # %bb.0: # %entry
448 ; X86-NEXT: pushl %esi
449 ; X86-NEXT: subl $24, %esp
450 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
451 ; X86-NEXT: subl $12, %esp
452 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
453 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
454 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
455 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
456 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
457 ; X86-NEXT: pushl %eax
458 ; X86-NEXT: calll log10l
459 ; X86-NEXT: addl $28, %esp
460 ; X86-NEXT: movaps (%esp), %xmm0
461 ; X86-NEXT: movaps %xmm0, (%esi)
462 ; X86-NEXT: movl %esi, %eax
463 ; X86-NEXT: addl $24, %esp
464 ; X86-NEXT: popl %esi
467 %log10 = call fp128 @llvm.experimental.constrained.log10.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
471 define fp128 @log2(fp128 %x) nounwind strictfp {
473 ; CHECK: # %bb.0: # %entry
474 ; CHECK-NEXT: pushq %rax
475 ; CHECK-NEXT: callq log2l@PLT
476 ; CHECK-NEXT: popq %rax
480 ; X86: # %bb.0: # %entry
481 ; X86-NEXT: pushl %esi
482 ; X86-NEXT: subl $24, %esp
483 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
484 ; X86-NEXT: subl $12, %esp
485 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
486 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
487 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
488 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
489 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
490 ; X86-NEXT: pushl %eax
491 ; X86-NEXT: calll log2l
492 ; X86-NEXT: addl $28, %esp
493 ; X86-NEXT: movaps (%esp), %xmm0
494 ; X86-NEXT: movaps %xmm0, (%esi)
495 ; X86-NEXT: movl %esi, %eax
496 ; X86-NEXT: addl $24, %esp
497 ; X86-NEXT: popl %esi
500 %log2 = call fp128 @llvm.experimental.constrained.log2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
504 define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
505 ; CHECK-LABEL: maxnum:
506 ; CHECK: # %bb.0: # %entry
507 ; CHECK-NEXT: pushq %rax
508 ; CHECK-NEXT: callq fmaxl@PLT
509 ; CHECK-NEXT: popq %rax
513 ; X86: # %bb.0: # %entry
514 ; X86-NEXT: pushl %esi
515 ; X86-NEXT: subl $24, %esp
516 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
517 ; X86-NEXT: subl $12, %esp
518 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
519 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
520 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
521 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
522 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
523 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
524 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
525 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
526 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
527 ; X86-NEXT: pushl %eax
528 ; X86-NEXT: calll fmaxl
529 ; X86-NEXT: addl $44, %esp
530 ; X86-NEXT: movaps (%esp), %xmm0
531 ; X86-NEXT: movaps %xmm0, (%esi)
532 ; X86-NEXT: movl %esi, %eax
533 ; X86-NEXT: addl $24, %esp
534 ; X86-NEXT: popl %esi
537 %maxnum = call fp128 @llvm.experimental.constrained.maxnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
541 define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
542 ; CHECK-LABEL: minnum:
543 ; CHECK: # %bb.0: # %entry
544 ; CHECK-NEXT: pushq %rax
545 ; CHECK-NEXT: callq fminl@PLT
546 ; CHECK-NEXT: popq %rax
550 ; X86: # %bb.0: # %entry
551 ; X86-NEXT: pushl %esi
552 ; X86-NEXT: subl $24, %esp
553 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
554 ; X86-NEXT: subl $12, %esp
555 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
556 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
557 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
558 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
559 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
560 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
561 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
562 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
563 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
564 ; X86-NEXT: pushl %eax
565 ; X86-NEXT: calll fminl
566 ; X86-NEXT: addl $44, %esp
567 ; X86-NEXT: movaps (%esp), %xmm0
568 ; X86-NEXT: movaps %xmm0, (%esi)
569 ; X86-NEXT: movl %esi, %eax
570 ; X86-NEXT: addl $24, %esp
571 ; X86-NEXT: popl %esi
574 %minnum = call fp128 @llvm.experimental.constrained.minnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
578 define fp128 @nearbyint(fp128 %x) nounwind strictfp {
579 ; CHECK-LABEL: nearbyint:
580 ; CHECK: # %bb.0: # %entry
581 ; CHECK-NEXT: pushq %rax
582 ; CHECK-NEXT: callq nearbyintl@PLT
583 ; CHECK-NEXT: popq %rax
586 ; X86-LABEL: nearbyint:
587 ; X86: # %bb.0: # %entry
588 ; X86-NEXT: pushl %esi
589 ; X86-NEXT: subl $24, %esp
590 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
591 ; X86-NEXT: subl $12, %esp
592 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
593 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
594 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
595 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
596 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
597 ; X86-NEXT: pushl %eax
598 ; X86-NEXT: calll nearbyintl
599 ; X86-NEXT: addl $28, %esp
600 ; X86-NEXT: movaps (%esp), %xmm0
601 ; X86-NEXT: movaps %xmm0, (%esi)
602 ; X86-NEXT: movl %esi, %eax
603 ; X86-NEXT: addl $24, %esp
604 ; X86-NEXT: popl %esi
607 %nearbyint = call fp128 @llvm.experimental.constrained.nearbyint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
611 define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
613 ; CHECK: # %bb.0: # %entry
614 ; CHECK-NEXT: pushq %rax
615 ; CHECK-NEXT: callq powl@PLT
616 ; CHECK-NEXT: popq %rax
620 ; X86: # %bb.0: # %entry
621 ; X86-NEXT: pushl %esi
622 ; X86-NEXT: subl $24, %esp
623 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
624 ; X86-NEXT: subl $12, %esp
625 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
626 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
627 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
628 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
629 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
630 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
631 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
632 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
633 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
634 ; X86-NEXT: pushl %eax
635 ; X86-NEXT: calll powl
636 ; X86-NEXT: addl $44, %esp
637 ; X86-NEXT: movaps (%esp), %xmm0
638 ; X86-NEXT: movaps %xmm0, (%esi)
639 ; X86-NEXT: movl %esi, %eax
640 ; X86-NEXT: addl $24, %esp
641 ; X86-NEXT: popl %esi
644 %pow = call fp128 @llvm.experimental.constrained.pow.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
648 define fp128 @powi(fp128 %x, i32 %y) nounwind strictfp {
650 ; CHECK: # %bb.0: # %entry
651 ; CHECK-NEXT: pushq %rax
652 ; CHECK-NEXT: callq __powitf2@PLT
653 ; CHECK-NEXT: popq %rax
657 ; X86: # %bb.0: # %entry
658 ; X86-NEXT: pushl %esi
659 ; X86-NEXT: subl $24, %esp
660 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
661 ; X86-NEXT: subl $8, %esp
662 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
663 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
664 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
665 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
666 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
667 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
668 ; X86-NEXT: pushl %eax
669 ; X86-NEXT: calll __powitf2
670 ; X86-NEXT: addl $28, %esp
671 ; X86-NEXT: movaps (%esp), %xmm0
672 ; X86-NEXT: movaps %xmm0, (%esi)
673 ; X86-NEXT: movl %esi, %eax
674 ; X86-NEXT: addl $24, %esp
675 ; X86-NEXT: popl %esi
678 %powi = call fp128 @llvm.experimental.constrained.powi.f128(fp128 %x, i32 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
682 define fp128 @rint(fp128 %x) nounwind strictfp {
684 ; CHECK: # %bb.0: # %entry
685 ; CHECK-NEXT: pushq %rax
686 ; CHECK-NEXT: callq rintl@PLT
687 ; CHECK-NEXT: popq %rax
691 ; X86: # %bb.0: # %entry
692 ; X86-NEXT: pushl %esi
693 ; X86-NEXT: subl $24, %esp
694 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
695 ; X86-NEXT: subl $12, %esp
696 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
697 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
698 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
699 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
700 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
701 ; X86-NEXT: pushl %eax
702 ; X86-NEXT: calll rintl
703 ; X86-NEXT: addl $28, %esp
704 ; X86-NEXT: movaps (%esp), %xmm0
705 ; X86-NEXT: movaps %xmm0, (%esi)
706 ; X86-NEXT: movl %esi, %eax
707 ; X86-NEXT: addl $24, %esp
708 ; X86-NEXT: popl %esi
711 %rint = call fp128 @llvm.experimental.constrained.rint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
715 define fp128 @round(fp128 %x) nounwind strictfp {
716 ; CHECK-LABEL: round:
717 ; CHECK: # %bb.0: # %entry
718 ; CHECK-NEXT: pushq %rax
719 ; CHECK-NEXT: callq roundl@PLT
720 ; CHECK-NEXT: popq %rax
724 ; X86: # %bb.0: # %entry
725 ; X86-NEXT: pushl %esi
726 ; X86-NEXT: subl $24, %esp
727 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
728 ; X86-NEXT: subl $12, %esp
729 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
730 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
731 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
732 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
733 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
734 ; X86-NEXT: pushl %eax
735 ; X86-NEXT: calll roundl
736 ; X86-NEXT: addl $28, %esp
737 ; X86-NEXT: movaps (%esp), %xmm0
738 ; X86-NEXT: movaps %xmm0, (%esi)
739 ; X86-NEXT: movl %esi, %eax
740 ; X86-NEXT: addl $24, %esp
741 ; X86-NEXT: popl %esi
744 %round = call fp128 @llvm.experimental.constrained.round.f128(fp128 %x, metadata !"fpexcept.strict") #0
748 define fp128 @roundeven(fp128 %x) nounwind strictfp {
749 ; CHECK-LABEL: roundeven:
750 ; CHECK: # %bb.0: # %entry
751 ; CHECK-NEXT: pushq %rax
752 ; CHECK-NEXT: callq roundevenl@PLT
753 ; CHECK-NEXT: popq %rax
756 ; X86-LABEL: roundeven:
757 ; X86: # %bb.0: # %entry
758 ; X86-NEXT: pushl %esi
759 ; X86-NEXT: subl $24, %esp
760 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
761 ; X86-NEXT: subl $12, %esp
762 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
763 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
764 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
765 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
766 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
767 ; X86-NEXT: pushl %eax
768 ; X86-NEXT: calll roundevenl
769 ; X86-NEXT: addl $28, %esp
770 ; X86-NEXT: movaps (%esp), %xmm0
771 ; X86-NEXT: movaps %xmm0, (%esi)
772 ; X86-NEXT: movl %esi, %eax
773 ; X86-NEXT: addl $24, %esp
774 ; X86-NEXT: popl %esi
777 %roundeven = call fp128 @llvm.experimental.constrained.roundeven.f128(fp128 %x, metadata !"fpexcept.strict") #0
781 define fp128 @sin(fp128 %x) nounwind strictfp {
783 ; CHECK: # %bb.0: # %entry
784 ; CHECK-NEXT: pushq %rax
785 ; CHECK-NEXT: callq sinl@PLT
786 ; CHECK-NEXT: popq %rax
790 ; X86: # %bb.0: # %entry
791 ; X86-NEXT: pushl %esi
792 ; X86-NEXT: subl $24, %esp
793 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
794 ; X86-NEXT: subl $12, %esp
795 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
796 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
797 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
798 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
799 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
800 ; X86-NEXT: pushl %eax
801 ; X86-NEXT: calll sinl
802 ; X86-NEXT: addl $28, %esp
803 ; X86-NEXT: movaps (%esp), %xmm0
804 ; X86-NEXT: movaps %xmm0, (%esi)
805 ; X86-NEXT: movl %esi, %eax
806 ; X86-NEXT: addl $24, %esp
807 ; X86-NEXT: popl %esi
810 %sin = call fp128 @llvm.experimental.constrained.sin.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
814 define fp128 @sqrt(fp128 %x) nounwind strictfp {
816 ; CHECK: # %bb.0: # %entry
817 ; CHECK-NEXT: pushq %rax
818 ; CHECK-NEXT: callq sqrtl@PLT
819 ; CHECK-NEXT: popq %rax
823 ; X86: # %bb.0: # %entry
824 ; X86-NEXT: pushl %esi
825 ; X86-NEXT: subl $24, %esp
826 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
827 ; X86-NEXT: subl $12, %esp
828 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
829 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
830 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
831 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
832 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
833 ; X86-NEXT: pushl %eax
834 ; X86-NEXT: calll sqrtl
835 ; X86-NEXT: addl $28, %esp
836 ; X86-NEXT: movaps (%esp), %xmm0
837 ; X86-NEXT: movaps %xmm0, (%esi)
838 ; X86-NEXT: movl %esi, %eax
839 ; X86-NEXT: addl $24, %esp
840 ; X86-NEXT: popl %esi
843 %sqrt = call fp128 @llvm.experimental.constrained.sqrt.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
847 define fp128 @trunc(fp128 %x) nounwind strictfp {
848 ; CHECK-LABEL: trunc:
849 ; CHECK: # %bb.0: # %entry
850 ; CHECK-NEXT: pushq %rax
851 ; CHECK-NEXT: callq truncl@PLT
852 ; CHECK-NEXT: popq %rax
856 ; X86: # %bb.0: # %entry
857 ; X86-NEXT: pushl %esi
858 ; X86-NEXT: subl $24, %esp
859 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
860 ; X86-NEXT: subl $12, %esp
861 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
862 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
863 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
864 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
865 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
866 ; X86-NEXT: pushl %eax
867 ; X86-NEXT: calll truncl
868 ; X86-NEXT: addl $28, %esp
869 ; X86-NEXT: movaps (%esp), %xmm0
870 ; X86-NEXT: movaps %xmm0, (%esi)
871 ; X86-NEXT: movl %esi, %eax
872 ; X86-NEXT: addl $24, %esp
873 ; X86-NEXT: popl %esi
876 %trunc = call fp128 @llvm.experimental.constrained.trunc.f128(fp128 %x, metadata !"fpexcept.strict") #0
880 define i32 @lrint(fp128 %x) nounwind strictfp {
881 ; CHECK-LABEL: lrint:
882 ; CHECK: # %bb.0: # %entry
883 ; CHECK-NEXT: pushq %rax
884 ; CHECK-NEXT: callq lrintl@PLT
885 ; CHECK-NEXT: popq %rcx
889 ; X86: # %bb.0: # %entry
890 ; X86-NEXT: subl $12, %esp
891 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
892 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
893 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
894 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
895 ; X86-NEXT: calll lrintl
896 ; X86-NEXT: addl $28, %esp
899 %rint = call i32 @llvm.experimental.constrained.lrint.i32.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
903 define i64 @llrint(fp128 %x) nounwind strictfp {
904 ; CHECK-LABEL: llrint:
905 ; CHECK: # %bb.0: # %entry
906 ; CHECK-NEXT: pushq %rax
907 ; CHECK-NEXT: callq llrintl@PLT
908 ; CHECK-NEXT: popq %rcx
912 ; X86: # %bb.0: # %entry
913 ; X86-NEXT: subl $12, %esp
914 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
915 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
916 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
917 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
918 ; X86-NEXT: calll llrintl
919 ; X86-NEXT: addl $28, %esp
922 %rint = call i64 @llvm.experimental.constrained.llrint.i64.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
926 define i32 @lround(fp128 %x) nounwind strictfp {
927 ; CHECK-LABEL: lround:
928 ; CHECK: # %bb.0: # %entry
929 ; CHECK-NEXT: pushq %rax
930 ; CHECK-NEXT: callq lroundl@PLT
931 ; CHECK-NEXT: popq %rcx
935 ; X86: # %bb.0: # %entry
936 ; X86-NEXT: subl $12, %esp
937 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
938 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
939 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
940 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
941 ; X86-NEXT: calll lroundl
942 ; X86-NEXT: addl $28, %esp
945 %round = call i32 @llvm.experimental.constrained.lround.i32.f128(fp128 %x, metadata !"fpexcept.strict") #0
949 define i64 @llround(fp128 %x) nounwind strictfp {
950 ; CHECK-LABEL: llround:
951 ; CHECK: # %bb.0: # %entry
952 ; CHECK-NEXT: pushq %rax
953 ; CHECK-NEXT: callq llroundl@PLT
954 ; CHECK-NEXT: popq %rcx
957 ; X86-LABEL: llround:
958 ; X86: # %bb.0: # %entry
959 ; X86-NEXT: subl $12, %esp
960 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
961 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
962 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
963 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
964 ; X86-NEXT: calll llroundl
965 ; X86-NEXT: addl $28, %esp
968 %round = call i64 @llvm.experimental.constrained.llround.i64.f128(fp128 %x, metadata !"fpexcept.strict") #0
972 define i64 @cmp(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
975 ; CHECK-NEXT: pushq %r14
976 ; CHECK-NEXT: pushq %rbx
977 ; CHECK-NEXT: pushq %rax
978 ; CHECK-NEXT: movq %rsi, %rbx
979 ; CHECK-NEXT: movq %rdi, %r14
980 ; CHECK-NEXT: callq __eqtf2@PLT
981 ; CHECK-NEXT: testl %eax, %eax
982 ; CHECK-NEXT: cmovneq %rbx, %r14
983 ; CHECK-NEXT: movq %r14, %rax
984 ; CHECK-NEXT: addq $8, %rsp
985 ; CHECK-NEXT: popq %rbx
986 ; CHECK-NEXT: popq %r14
991 ; X86-NEXT: subl $12, %esp
992 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
993 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
994 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
995 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
996 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
997 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
998 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
999 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1000 ; X86-NEXT: calll __eqtf2
1001 ; X86-NEXT: addl $32, %esp
1002 ; X86-NEXT: testl %eax, %eax
1003 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1004 ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
1005 ; X86-NEXT: cmovel %eax, %ecx
1006 ; X86-NEXT: movl (%ecx), %eax
1007 ; X86-NEXT: movl 4(%ecx), %edx
1008 ; X86-NEXT: addl $12, %esp
1010 %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1013 metadata !"fpexcept.strict") #0
1014 %res = select i1 %cond, i64 %a, i64 %b
1018 define i64 @cmps(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1019 ; CHECK-LABEL: cmps:
1021 ; CHECK-NEXT: pushq %r14
1022 ; CHECK-NEXT: pushq %rbx
1023 ; CHECK-NEXT: pushq %rax
1024 ; CHECK-NEXT: movq %rsi, %rbx
1025 ; CHECK-NEXT: movq %rdi, %r14
1026 ; CHECK-NEXT: callq __eqtf2@PLT
1027 ; CHECK-NEXT: testl %eax, %eax
1028 ; CHECK-NEXT: cmovneq %rbx, %r14
1029 ; CHECK-NEXT: movq %r14, %rax
1030 ; CHECK-NEXT: addq $8, %rsp
1031 ; CHECK-NEXT: popq %rbx
1032 ; CHECK-NEXT: popq %r14
1037 ; X86-NEXT: subl $12, %esp
1038 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1039 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1040 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1041 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1042 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1043 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1044 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1045 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1046 ; X86-NEXT: calll __eqtf2
1047 ; X86-NEXT: addl $32, %esp
1048 ; X86-NEXT: testl %eax, %eax
1049 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1050 ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
1051 ; X86-NEXT: cmovel %eax, %ecx
1052 ; X86-NEXT: movl (%ecx), %eax
1053 ; X86-NEXT: movl 4(%ecx), %edx
1054 ; X86-NEXT: addl $12, %esp
1056 %cond = call i1 @llvm.experimental.constrained.fcmps.f128(
1059 metadata !"fpexcept.strict") #0
1060 %res = select i1 %cond, i64 %a, i64 %b
1064 define i64 @cmp_ueq_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1065 ; CHECK-LABEL: cmp_ueq_q:
1067 ; CHECK-NEXT: pushq %rbp
1068 ; CHECK-NEXT: pushq %r14
1069 ; CHECK-NEXT: pushq %rbx
1070 ; CHECK-NEXT: subq $32, %rsp
1071 ; CHECK-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1072 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1073 ; CHECK-NEXT: movq %rsi, %rbx
1074 ; CHECK-NEXT: movq %rdi, %r14
1075 ; CHECK-NEXT: callq __eqtf2@PLT
1076 ; CHECK-NEXT: testl %eax, %eax
1077 ; CHECK-NEXT: sete %bpl
1078 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1079 ; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
1080 ; CHECK-NEXT: callq __unordtf2@PLT
1081 ; CHECK-NEXT: testl %eax, %eax
1082 ; CHECK-NEXT: setne %al
1083 ; CHECK-NEXT: orb %bpl, %al
1084 ; CHECK-NEXT: cmoveq %rbx, %r14
1085 ; CHECK-NEXT: movq %r14, %rax
1086 ; CHECK-NEXT: addq $32, %rsp
1087 ; CHECK-NEXT: popq %rbx
1088 ; CHECK-NEXT: popq %r14
1089 ; CHECK-NEXT: popq %rbp
1092 ; X86-LABEL: cmp_ueq_q:
1094 ; X86-NEXT: pushl %ebp
1095 ; X86-NEXT: pushl %ebx
1096 ; X86-NEXT: pushl %edi
1097 ; X86-NEXT: pushl %esi
1098 ; X86-NEXT: subl $12, %esp
1099 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
1100 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
1101 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
1102 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1103 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1104 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1105 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1106 ; X86-NEXT: pushl %ebx
1107 ; X86-NEXT: movl %ebx, %esi
1108 ; X86-NEXT: pushl %edi
1109 ; X86-NEXT: pushl %ebp
1110 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1111 ; X86-NEXT: calll __eqtf2
1112 ; X86-NEXT: addl $32, %esp
1113 ; X86-NEXT: testl %eax, %eax
1114 ; X86-NEXT: sete %bl
1115 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1116 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1117 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1118 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1119 ; X86-NEXT: pushl %esi
1120 ; X86-NEXT: pushl %edi
1121 ; X86-NEXT: pushl %ebp
1122 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1123 ; X86-NEXT: calll __unordtf2
1124 ; X86-NEXT: addl $32, %esp
1125 ; X86-NEXT: testl %eax, %eax
1126 ; X86-NEXT: setne %al
1127 ; X86-NEXT: orb %bl, %al
1128 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1129 ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
1130 ; X86-NEXT: cmovnel %eax, %ecx
1131 ; X86-NEXT: movl (%ecx), %eax
1132 ; X86-NEXT: movl 4(%ecx), %edx
1133 ; X86-NEXT: addl $12, %esp
1134 ; X86-NEXT: popl %esi
1135 ; X86-NEXT: popl %edi
1136 ; X86-NEXT: popl %ebx
1137 ; X86-NEXT: popl %ebp
1139 %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1142 metadata !"fpexcept.strict") #0
1143 %res = select i1 %cond, i64 %a, i64 %b
1147 define i64 @cmp_one_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1148 ; CHECK-LABEL: cmp_one_q:
1150 ; CHECK-NEXT: pushq %rbp
1151 ; CHECK-NEXT: pushq %r14
1152 ; CHECK-NEXT: pushq %rbx
1153 ; CHECK-NEXT: subq $32, %rsp
1154 ; CHECK-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1155 ; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
1156 ; CHECK-NEXT: movq %rsi, %rbx
1157 ; CHECK-NEXT: movq %rdi, %r14
1158 ; CHECK-NEXT: callq __eqtf2@PLT
1159 ; CHECK-NEXT: testl %eax, %eax
1160 ; CHECK-NEXT: setne %bpl
1161 ; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
1162 ; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
1163 ; CHECK-NEXT: callq __unordtf2@PLT
1164 ; CHECK-NEXT: testl %eax, %eax
1165 ; CHECK-NEXT: sete %al
1166 ; CHECK-NEXT: testb %bpl, %al
1167 ; CHECK-NEXT: cmoveq %rbx, %r14
1168 ; CHECK-NEXT: movq %r14, %rax
1169 ; CHECK-NEXT: addq $32, %rsp
1170 ; CHECK-NEXT: popq %rbx
1171 ; CHECK-NEXT: popq %r14
1172 ; CHECK-NEXT: popq %rbp
1175 ; X86-LABEL: cmp_one_q:
1177 ; X86-NEXT: pushl %ebp
1178 ; X86-NEXT: pushl %ebx
1179 ; X86-NEXT: pushl %edi
1180 ; X86-NEXT: pushl %esi
1181 ; X86-NEXT: subl $12, %esp
1182 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
1183 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
1184 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
1185 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1186 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1187 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1188 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1189 ; X86-NEXT: pushl %ebx
1190 ; X86-NEXT: movl %ebx, %esi
1191 ; X86-NEXT: pushl %edi
1192 ; X86-NEXT: pushl %ebp
1193 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1194 ; X86-NEXT: calll __eqtf2
1195 ; X86-NEXT: addl $32, %esp
1196 ; X86-NEXT: testl %eax, %eax
1197 ; X86-NEXT: setne %bl
1198 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1199 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1200 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1201 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1202 ; X86-NEXT: pushl %esi
1203 ; X86-NEXT: pushl %edi
1204 ; X86-NEXT: pushl %ebp
1205 ; X86-NEXT: pushl {{[0-9]+}}(%esp)
1206 ; X86-NEXT: calll __unordtf2
1207 ; X86-NEXT: addl $32, %esp
1208 ; X86-NEXT: testl %eax, %eax
1209 ; X86-NEXT: sete %al
1210 ; X86-NEXT: testb %bl, %al
1211 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1212 ; X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
1213 ; X86-NEXT: cmovnel %eax, %ecx
1214 ; X86-NEXT: movl (%ecx), %eax
1215 ; X86-NEXT: movl 4(%ecx), %edx
1216 ; X86-NEXT: addl $12, %esp
1217 ; X86-NEXT: popl %esi
1218 ; X86-NEXT: popl %edi
1219 ; X86-NEXT: popl %ebx
1220 ; X86-NEXT: popl %ebp
1222 %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1225 metadata !"fpexcept.strict") #0
1226 %res = select i1 %cond, i64 %a, i64 %b
1230 attributes #0 = { nounwind strictfp }
1232 declare fp128 @llvm.experimental.constrained.fadd.f128(fp128, fp128, metadata, metadata)
1233 declare fp128 @llvm.experimental.constrained.fsub.f128(fp128, fp128, metadata, metadata)
1234 declare fp128 @llvm.experimental.constrained.fmul.f128(fp128, fp128, metadata, metadata)
1235 declare fp128 @llvm.experimental.constrained.fdiv.f128(fp128, fp128, metadata, metadata)
1236 declare fp128 @llvm.experimental.constrained.fma.f128(fp128, fp128, fp128, metadata, metadata)
1237 declare fp128 @llvm.experimental.constrained.frem.f128(fp128, fp128, metadata, metadata)
1238 declare fp128 @llvm.experimental.constrained.ceil.f128(fp128, metadata)
1239 declare fp128 @llvm.experimental.constrained.cos.f128(fp128, metadata, metadata)
1240 declare fp128 @llvm.experimental.constrained.exp.f128(fp128, metadata, metadata)
1241 declare fp128 @llvm.experimental.constrained.exp2.f128(fp128, metadata, metadata)
1242 declare fp128 @llvm.experimental.constrained.floor.f128(fp128, metadata)
1243 declare fp128 @llvm.experimental.constrained.log.f128(fp128, metadata, metadata)
1244 declare fp128 @llvm.experimental.constrained.log10.f128(fp128, metadata, metadata)
1245 declare fp128 @llvm.experimental.constrained.log2.f128(fp128, metadata, metadata)
1246 declare fp128 @llvm.experimental.constrained.maxnum.f128(fp128, fp128, metadata)
1247 declare fp128 @llvm.experimental.constrained.minnum.f128(fp128, fp128, metadata)
1248 declare fp128 @llvm.experimental.constrained.nearbyint.f128(fp128, metadata, metadata)
1249 declare fp128 @llvm.experimental.constrained.pow.f128(fp128, fp128, metadata, metadata)
1250 declare fp128 @llvm.experimental.constrained.powi.f128(fp128, i32, metadata, metadata)
1251 declare fp128 @llvm.experimental.constrained.rint.f128(fp128, metadata, metadata)
1252 declare fp128 @llvm.experimental.constrained.round.f128(fp128, metadata)
1253 declare fp128 @llvm.experimental.constrained.roundeven.f128(fp128, metadata)
1254 declare fp128 @llvm.experimental.constrained.sin.f128(fp128, metadata, metadata)
1255 declare fp128 @llvm.experimental.constrained.sqrt.f128(fp128, metadata, metadata)
1256 declare fp128 @llvm.experimental.constrained.trunc.f128(fp128, metadata)
1257 declare i32 @llvm.experimental.constrained.lrint.i32.f128(fp128, metadata, metadata)
1258 declare i64 @llvm.experimental.constrained.llrint.i64.f128(fp128, metadata, metadata)
1259 declare i32 @llvm.experimental.constrained.lround.i32.f128(fp128, metadata)
1260 declare i64 @llvm.experimental.constrained.llround.i64.f128(fp128, metadata)
1261 declare i1 @llvm.experimental.constrained.fcmp.f128(fp128, fp128, metadata, metadata)
1262 declare i1 @llvm.experimental.constrained.fcmps.f128(fp128, fp128, metadata, metadata)