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