1 ; RUN: llc < %s -mtriple=arm-apple-darwin -march=arm | FileCheck %s -check-prefix=CHECKV4
2 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin -mattr=+v5t | FileCheck %s -check-prefix=CHECKV5
3 ; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi\
4 ; RUN: -relocation-model=pic | FileCheck %s -check-prefix=CHECKELF
7 @t = weak global i32 ()* null ; <i32 ()**> [#uses=1]
9 declare void @g(i32, i32, i32, i32)
14 call void @g( i32 1, i32 2, i32 3, i32 4 )
20 ; CHECKV4: bx r0 @ TAILCALL
22 ; CHECKV5: bx r0 @ TAILCALL
23 %tmp = load i32 ()** @t ; <i32 ()*> [#uses=1]
24 %tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0]
28 define i32* @t3(i32, i32, i32*, i32*, i32*) nounwind {
32 %5 = inttoptr i32 %0 to i32* ; <i32*> [#uses=1]
33 %t35 = volatile load i32* %5 ; <i32> [#uses=1]
34 %6 = inttoptr i32 %t35 to i32** ; <i32**> [#uses=1]
35 %7 = getelementptr i32** %6, i32 86 ; <i32**> [#uses=1]
36 %8 = load i32** %7 ; <i32*> [#uses=1]
37 %9 = bitcast i32* %8 to i32* (i32, i32*, i32, i32*, i32*, i32*)* ; <i32* (i32, i32*, i32, i32*, i32*, i32*)*> [#uses=1]
38 %10 = call i32* %9(i32 %0, i32* null, i32 %1, i32* %2, i32* %3, i32* %4) ; <i32*> [#uses=1]
44 ; CHECKV4: b _t2 @ TAILCALL
46 ; CHECKV5: b _t2 @ TAILCALL
47 tail call void @t2( ) ; <i32> [#uses=0]