2010-05-12 00:11:24 +00:00
|
|
|
; RUN: llc < %s -regalloc=fast -relocation-model=pic | FileCheck %s
|
2010-01-15 22:27:37 +00:00
|
|
|
|
|
|
|
target triple = "thumbv6-apple-darwin10"
|
|
|
|
|
|
|
|
@fred = internal global i32 0 ; <i32*> [#uses=1]
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define void @foo() nounwind {
|
2010-01-15 22:27:37 +00:00
|
|
|
entry:
|
2010-05-12 00:11:24 +00:00
|
|
|
; CHECK: str r0, [sp
|
2010-06-17 15:18:27 +00:00
|
|
|
%0 = call i32 (...)* @bar() nounwind ; <i32> [#uses=1]
|
2010-01-15 22:27:37 +00:00
|
|
|
; CHECK: blx _bar
|
2010-05-12 00:11:24 +00:00
|
|
|
; CHECK: ldr r1, [sp
|
2010-01-15 22:27:37 +00:00
|
|
|
store i32 %0, i32* @fred, align 4
|
|
|
|
br label %return
|
|
|
|
|
|
|
|
return: ; preds = %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare i32 @bar(...)
|