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 i32 @ldexpf_not_fp(i32 %a, i32 %b) {
6 ; CHECK-LABEL: ldexpf_not_fp:
8 ; CHECK-NEXT: pushq %rax
9 ; CHECK-NEXT: .cfi_def_cfa_offset 16
10 ; CHECK-NEXT: callq ldexpf@PLT
11 ; CHECK-NEXT: popq %rcx
12 ; CHECK-NEXT: .cfi_def_cfa_offset 8
15 ; CHECK-WIN-LABEL: ldexpf_not_fp:
17 ; CHECK-WIN-NEXT: pushl {{[0-9]+}}(%esp)
18 ; CHECK-WIN-NEXT: pushl {{[0-9]+}}(%esp)
19 ; CHECK-WIN-NEXT: calll _ldexpf
20 ; CHECK-WIN-NEXT: addl $8, %esp
21 ; CHECK-WIN-NEXT: retl
22 %result = call i32 @ldexpf(i32 %a, i32 %b) #0
26 define float @ldexp_not_int(float %a, float %b) {
27 ; CHECK-LABEL: ldexp_not_int:
29 ; CHECK-NEXT: pushq %rax
30 ; CHECK-NEXT: .cfi_def_cfa_offset 16
31 ; CHECK-NEXT: callq ldexp@PLT
32 ; CHECK-NEXT: popq %rax
33 ; CHECK-NEXT: .cfi_def_cfa_offset 8
36 ; CHECK-WIN-LABEL: ldexp_not_int:
38 ; CHECK-WIN-NEXT: subl $8, %esp
39 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
40 ; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
41 ; CHECK-WIN-NEXT: fstps {{[0-9]+}}(%esp)
42 ; CHECK-WIN-NEXT: fstps (%esp)
43 ; CHECK-WIN-NEXT: calll _ldexp
44 ; CHECK-WIN-NEXT: addl $8, %esp
45 ; CHECK-WIN-NEXT: retl
46 %result = call float @ldexp(float %a, float %b) #0
50 declare i32 @ldexpf(i32, i32) #0
51 declare float @ldexp(float, float) #0
53 attributes #0 = { nounwind readnone }