2009-09-09 08:09:15 +08: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 08:16:10 +08:00
|
|
|
|
|
|
|
@t = weak global i32 ()* null ; <i32 ()**> [#uses=1]
|
|
|
|
|
|
|
|
declare void @g(i32, i32, i32, i32)
|
|
|
|
|
|
|
|
define void @f() {
|
2009-08-02 10:54:34 +08:00
|
|
|
; DARWIN: f:
|
2009-08-29 07:18:09 +08:00
|
|
|
; DARWIN: blx _g
|
2009-08-02 10:54:34 +08:00
|
|
|
|
|
|
|
; LINUX: f:
|
|
|
|
; LINUX: bl g
|
2009-08-01 08:16:10 +08:00
|
|
|
call void @g( i32 1, i32 2, i32 3, i32 4 )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @h() {
|
2009-08-02 10:54:34 +08:00
|
|
|
; DARWIN: h:
|
|
|
|
; DARWIN: blx r0
|
|
|
|
|
|
|
|
; LINUX: h:
|
|
|
|
; LINUX: blx r0
|
2009-08-01 08:16:10 +08:00
|
|
|
%tmp = load i32 ()** @t ; <i32 ()*> [#uses=1]
|
2010-06-04 05:57:48 +08:00
|
|
|
%tmp.upgrd.2 = call i32 %tmp( ) ; <i32> [#uses=0]
|
2009-08-01 08:16:10 +08:00
|
|
|
ret void
|
|
|
|
}
|