aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-05-23 18:38:57 +0000
committerChad Rosier <mcrosier@apple.com>2012-05-23 18:38:57 +0000
commit1c8fccbc12e6348c8003aff9b89078324257fc4e (patch)
treed76ee6c0b5349ef2ad5a5529f3e7515aa62c1172 /test/CodeGen/ARM
parent2b526300944b3f9cb3147ae1b72653cdab9fe1f9 (diff)
[arm-fast-isel] Add support for non-global callee.
Patch by Jush Lu <jush.msn@gmail.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r--test/CodeGen/ARM/fast-isel-call.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fast-isel-call.ll b/test/CodeGen/ARM/fast-isel-call.ll
index dd460b2a03..10d6746acf 100644
--- a/test/CodeGen/ARM/fast-isel-call.ll
+++ b/test/CodeGen/ARM/fast-isel-call.ll
@@ -126,3 +126,23 @@ entry:
}
declare i32 @bar(i8 zeroext, i8 zeroext, i8 zeroext, i8 zeroext, i8 zeroext, i8 zeroext)
+
+define i32 @bar0(i32 %i) nounwind {
+ ret i32 0
+}
+
+define void @foo3() uwtable {
+; ARM: movw r0, #0
+; ARM: movw r1, :lower16:_bar0
+; ARM: movt r1, :upper16:_bar0
+; ARM: blx r1
+; THUMB: movs r0, #0
+; THUMB: movw r1, :lower16:_bar0
+; THUMB: movt r1, :upper16:_bar0
+; THUMB: blx r1
+ %fptr = alloca i32 (i32)*, align 8
+ store i32 (i32)* @bar0, i32 (i32)** %fptr, align 8
+ %1 = load i32 (i32)** %fptr, align 8
+ %call = call i32 %1(i32 0)
+ ret void
+}