Enable sibling call optimization of libcalls which are expanded during
[oota-llvm.git] / test / CodeGen / X86 / sibcall-5.ll
1 ; RUN: llc < %s -march=x86-64 | FileCheck %s
2
3 ; Sibcall optimization of expanded libcalls.
4 ; rdar://8707777
5
6 define double @foo(double %a) nounwind readonly ssp {
7 entry:
8 ; CHECK: foo:
9 ; CHECK: jmp {{_?}}sin
10   %0 = tail call double @sin(double %a) nounwind readonly
11   ret double %0
12 }
13
14 define float @bar(float %a) nounwind readonly ssp {
15 ; CHECK: bar:
16 ; CHECK: jmp {{_?}}sinf
17 entry:
18   %0 = tail call float @sinf(float %a) nounwind readonly
19   ret float %0
20 }
21
22 declare float @sinf(float) nounwind readonly
23
24 declare double @sin(double) nounwind readonly