2016-05-11 03:17:47 +08:00
|
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 | FileCheck %s
|
|
|
|
; RUN: llc < %s -mtriple=thumbv7-linux -mattr=+thumb2 | FileCheck %s
|
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() {
|
2016-05-11 03:17:47 +08:00
|
|
|
; CHECK-LABEL: f:
|
|
|
|
; CHECK: 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() {
|
2016-05-11 03:17:47 +08:00
|
|
|
; CHECK-LABEL: h:
|
|
|
|
; CHECK: blx r0
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp = load i32 ()*, 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
|
|
|
|
}
|