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 @ldexpf_too_many_args(float %a, i32 %b, i32 %c) {
6 ; CHECK-LABEL: ldexpf_too_many_args:
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: ldexpf_too_many_args:
17 ; CHECK-WIN-NEXT: subl $12, %esp
18 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
19 ; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %eax
20 ; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %ecx
21 ; CHECK-WIN-NEXT: movl %ecx, {{[0-9]+}}(%esp)
22 ; CHECK-WIN-NEXT: movl %eax, {{[0-9]+}}(%esp)
23 ; CHECK-WIN-NEXT: fstps (%esp)
24 ; CHECK-WIN-NEXT: calll _ldexpf
25 ; CHECK-WIN-NEXT: addl $12, %esp
26 ; CHECK-WIN-NEXT: retl
27 %result = call float @ldexpf(float %a, i32 %b, i32 %c) #0
31 define float @ldexp_wrong_fp_type(float %a, i32 %b) {
32 ; CHECK-LABEL: ldexp_wrong_fp_type:
34 ; CHECK-NEXT: pushq %rax
35 ; CHECK-NEXT: .cfi_def_cfa_offset 16
36 ; CHECK-NEXT: callq ldexp@PLT
37 ; CHECK-NEXT: popq %rax
38 ; CHECK-NEXT: .cfi_def_cfa_offset 8
41 ; CHECK-WIN-LABEL: ldexp_wrong_fp_type:
43 ; CHECK-WIN-NEXT: subl $8, %esp
44 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
45 ; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %eax
46 ; CHECK-WIN-NEXT: movl %eax, {{[0-9]+}}(%esp)
47 ; CHECK-WIN-NEXT: fstps (%esp)
48 ; CHECK-WIN-NEXT: calll _ldexp
49 ; CHECK-WIN-NEXT: addl $8, %esp
50 ; CHECK-WIN-NEXT: retl
51 %result = call float @ldexp(float %a, i32 %b) #0
55 declare float @ldexpf(float, i32, i32) #0
56 declare float @ldexp(float, i32) #0
58 attributes #0 = { nounwind readnone }