1 ; RUN: llc < %s -mtriple=armv6-apple-darwin -mattr=+vfp2 -arm-tail-calls | FileCheck %s -check-prefix=CHECKV6
2 ; RUN: llc < %s -mtriple=armv6-linux-gnueabi -relocation-model=pic -mattr=+vfp2 -arm-tail-calls | FileCheck %s -check-prefix=CHECKELF
4 @t = weak global i32 ()* null ; <i32 ()**> [#uses=1]
6 declare void @g(i32, i32, i32, i32)
11 call void @g( i32 1, i32 2, i32 3, i32 4 )
17 ; CHECKV6: bx r0 @ TAILCALL
18 %tmp = load i32 ()** @t ; <i32 ()*> [#uses=1]
19 %tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0]
25 ; CHECKV6: b _t2 @ TAILCALL
27 ; CHECKELF: b t2(PLT) @ TAILCALL
28 tail call void @t2( ) ; <i32> [#uses=0]
32 ; Sibcall optimization of expanded libcalls. rdar://8707777
33 define double @t4(double %a) nounwind readonly ssp {
36 ; CHECKV6: b _sin @ TAILCALL
38 ; CHECKELF: b sin(PLT) @ TAILCALL
39 %0 = tail call double @sin(double %a) nounwind readonly ; <double> [#uses=1]
43 define float @t5(float %a) nounwind readonly ssp {
46 ; CHECKV6: b _sinf @ TAILCALL
48 ; CHECKELF: b sinf(PLT) @ TAILCALL
49 %0 = tail call float @sinf(float %a) nounwind readonly ; <float> [#uses=1]
53 declare float @sinf(float) nounwind readonly
55 declare double @sin(double) nounwind readonly
57 define i32 @t6(i32 %a, i32 %b) nounwind readnone {
60 ; CHECKV6: b ___divsi3 @ TAILCALL
62 ; CHECKELF: b __aeabi_idiv(PLT) @ TAILCALL