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_ldexpf(float %a, i32 %b) {
6 ; CHECK-LABEL: call_ldexpf:
8 ; CHECK-NEXT: pushq %rax
9 ; CHECK-NEXT: .cfi_def_cfa_offset 16
10 ; CHECK-NEXT: callq ldexpf@PLT
11 ; CHECK-NEXT: popq %rax
12 ; CHECK-NEXT: .cfi_def_cfa_offset 8
15 ; CHECK-WIN-LABEL: call_ldexpf:
17 ; CHECK-WIN-NEXT: subl $8, %esp
18 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
19 ; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %eax
20 ; CHECK-WIN-NEXT: movl %eax, {{[0-9]+}}(%esp)
21 ; CHECK-WIN-NEXT: fstps (%esp)
22 ; CHECK-WIN-NEXT: calll _ldexpf
23 ; CHECK-WIN-NEXT: addl $8, %esp
24 ; CHECK-WIN-NEXT: retl
25 %result = call float @ldexpf(float %a, i32 %b)
29 define double @call_ldexp(double %a, i32 %b) {
30 ; CHECK-LABEL: call_ldexp:
32 ; CHECK-NEXT: pushq %rax
33 ; CHECK-NEXT: .cfi_def_cfa_offset 16
34 ; CHECK-NEXT: callq ldexp@PLT
35 ; CHECK-NEXT: popq %rax
36 ; CHECK-NEXT: .cfi_def_cfa_offset 8
39 ; CHECK-WIN-LABEL: call_ldexp:
41 ; CHECK-WIN-NEXT: subl $12, %esp
42 ; CHECK-WIN-NEXT: fldl {{[0-9]+}}(%esp)
43 ; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %eax
44 ; CHECK-WIN-NEXT: movl %eax, {{[0-9]+}}(%esp)
45 ; CHECK-WIN-NEXT: fstpl (%esp)
46 ; CHECK-WIN-NEXT: calll _ldexp
47 ; CHECK-WIN-NEXT: addl $12, %esp
48 ; CHECK-WIN-NEXT: retl
49 %result = call double @ldexp(double %a, i32 %b)
53 declare float @ldexpf(float %a, i32 %b)
54 declare double @ldexp(double %a, i32 %b)