1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/test/CodeGen/X86/sibcall-5.ll
Evan Cheng f7e586d749 Enable sibling call optimization of libcalls which are expanded during
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777

llvm-svn: 120501
2010-11-30 23:55:39 +00:00

25 lines
548 B
LLVM

; RUN: llc < %s -march=x86-64 | FileCheck %s
; Sibcall optimization of expanded libcalls.
; rdar://8707777
define double @foo(double %a) nounwind readonly ssp {
entry:
; CHECK: foo:
; CHECK: jmp {{_?}}sin
%0 = tail call double @sin(double %a) nounwind readonly
ret double %0
}
define float @bar(float %a) nounwind readonly ssp {
; CHECK: bar:
; CHECK: jmp {{_?}}sinf
entry:
%0 = tail call float @sinf(float %a) nounwind readonly
ret float %0
}
declare float @sinf(float) nounwind readonly
declare double @sin(double) nounwind readonly