2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 | FileCheck %s -check-prefix=DARWIN
|
|
|
|
; RUN: llc < %s -mtriple=thumbv7-linux -mattr=+thumb2 | FileCheck %s -check-prefix=LINUX
|
2009-08-01 00:16:10 +00:00
|
|
|
|
|
|
|
@t = weak global i32 ()* null ; <i32 ()**> [#uses=1]
|
|
|
|
|
|
|
|
declare void @g(i32, i32, i32, i32)
|
|
|
|
|
|
|
|
define void @f() {
|
2009-08-02 02:54:34 +00:00
|
|
|
; DARWIN: f:
|
2009-08-28 23:18:09 +00:00
|
|
|
; DARWIN: blx _g
|
2009-08-02 02:54:34 +00:00
|
|
|
|
|
|
|
; LINUX: f:
|
|
|
|
; LINUX: bl g
|
2009-08-01 00:16:10 +00:00
|
|
|
call void @g( i32 1, i32 2, i32 3, i32 4 )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @h() {
|
2009-08-02 02:54:34 +00:00
|
|
|
; DARWIN: h:
|
|
|
|
; DARWIN: blx r0
|
|
|
|
|
|
|
|
; LINUX: h:
|
|
|
|
; LINUX: blx r0
|
2009-08-01 00:16:10 +00:00
|
|
|
%tmp = load i32 ()** @t ; <i32 ()*> [#uses=1]
|
|
|
|
%tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0]
|
|
|
|
ret void
|
|
|
|
}
|