1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
3 ; RUN: llc < %s -mtriple=i386-pc-win32 | FileCheck %s -check-prefix=CHECK-WIN
5 define float @call_exp10f(float %a) {
6 ; CHECK-LABEL: call_exp10f:
8 ; CHECK-NEXT: pushq %rax
9 ; CHECK-NEXT: .cfi_def_cfa_offset 16
10 ; CHECK-NEXT: callq exp10f@PLT
11 ; CHECK-NEXT: popq %rax
12 ; CHECK-NEXT: .cfi_def_cfa_offset 8
15 ; CHECK-WIN-LABEL: call_exp10f:
17 ; CHECK-WIN-NEXT: pushl %eax
18 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
19 ; CHECK-WIN-NEXT: fstps (%esp)
20 ; CHECK-WIN-NEXT: calll _exp10f
21 ; CHECK-WIN-NEXT: popl %eax
22 ; CHECK-WIN-NEXT: retl
23 %result = call float @exp10f(float %a)
27 define double @call_exp10(double %a) {
28 ; CHECK-LABEL: call_exp10:
30 ; CHECK-NEXT: pushq %rax
31 ; CHECK-NEXT: .cfi_def_cfa_offset 16
32 ; CHECK-NEXT: callq exp10@PLT
33 ; CHECK-NEXT: popq %rax
34 ; CHECK-NEXT: .cfi_def_cfa_offset 8
37 ; CHECK-WIN-LABEL: call_exp10:
39 ; CHECK-WIN-NEXT: subl $8, %esp
40 ; CHECK-WIN-NEXT: fldl {{[0-9]+}}(%esp)
41 ; CHECK-WIN-NEXT: fstpl (%esp)
42 ; CHECK-WIN-NEXT: calll _exp10
43 ; CHECK-WIN-NEXT: addl $8, %esp
44 ; CHECK-WIN-NEXT: retl
45 %result = call double @exp10(double %a)
49 define x86_fp80 @call_exp10l(x86_fp80 %a) {
50 ; CHECK-LABEL: call_exp10l:
52 ; CHECK-NEXT: subq $24, %rsp
53 ; CHECK-NEXT: .cfi_def_cfa_offset 32
54 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
55 ; CHECK-NEXT: fstpt (%rsp)
56 ; CHECK-NEXT: callq exp10l@PLT
57 ; CHECK-NEXT: addq $24, %rsp
58 ; CHECK-NEXT: .cfi_def_cfa_offset 8
61 ; CHECK-WIN-LABEL: call_exp10l:
63 ; CHECK-WIN-NEXT: pushl %ebp
64 ; CHECK-WIN-NEXT: movl %esp, %ebp
65 ; CHECK-WIN-NEXT: andl $-16, %esp
66 ; CHECK-WIN-NEXT: subl $32, %esp
67 ; CHECK-WIN-NEXT: fldt 8(%ebp)
68 ; CHECK-WIN-NEXT: fstpt (%esp)
69 ; CHECK-WIN-NEXT: calll _exp10l
70 ; CHECK-WIN-NEXT: movl %ebp, %esp
71 ; CHECK-WIN-NEXT: popl %ebp
72 ; CHECK-WIN-NEXT: retl
73 %result = call x86_fp80 @exp10l(x86_fp80 %a)
77 declare float @exp10f(float %a) #0
78 declare double @exp10(double %a) #0
79 declare x86_fp80 @exp10l(x86_fp80 %a) #0
81 attributes #0 = { nounwind readonly }