39 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 | FileCheck %s -check-prefix=DARWIN2; RUN: llc < %s -mtriple=thumbv7-linux -mattr=+thumb2 | FileCheck %s -check-prefix=LINUX3; XFAIL: *4 5@t = weak global ptr null ; <ptr> [#uses=1]6 7declare void @g(i32, i32, i32, i32)8 9define void @f() {10; DARWIN-LABEL: f:11; DARWIN: blx _g12 13; LINUX-LABEL: f:14; LINUX: bl g15 tail call void @g( i32 1, i32 2, i32 3, i32 4 )16 ret void17}18 19define void @h() {20; DARWIN-LABEL: h:21; DARWIN: bx r0 @ TAILCALL22 23; LINUX-LABEL: h:24; LINUX: bx r0 @ TAILCALL25 %tmp = load ptr, ptr @t ; <ptr> [#uses=1]26 %tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0]27 ret void28}29 30define void @j() {31; DARWIN-LABEL: j:32; DARWIN: b.w _f @ TAILCALL33 34; LINUX-LABEL: j:35; LINUX: b.w f @ TAILCALL36 tail call void @f()37 ret void38}39