summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-02-07 23:56:08 +0000
committerChad Rosier <mcrosier@apple.com>2012-02-07 23:56:08 +0000
commitded4c99f2e0561fcebbdc7736472ba8c2b8ce463 (patch)
tree12d30cc4d91ae9707c557b277eaa14ff0cb7993c /llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll
parentd925d1a8d7d9934b1bf3c9c0c5d88baffb1c4c1b (diff)
downloadbcm5719-llvm-ded4c99f2e0561fcebbdc7736472ba8c2b8ce463.tar.gz
bcm5719-llvm-ded4c99f2e0561fcebbdc7736472ba8c2b8ce463.zip
[fast-isel] Add support for indirect branches.
llvm-svn: 150014
Diffstat (limited to 'llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll')
-rw-r--r--llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll b/llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll
new file mode 100644
index 00000000000..be8035ec794
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/fast-isel-indirectbr.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
+; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
+
+define void @t1(i8* %x) {
+entry:
+; ARM: t1
+; THUMB: t1
+ br label %L0
+
+L0:
+ br label %L1
+
+L1:
+ indirectbr i8* %x, [ label %L0, label %L1 ]
+; ARM: bx r0
+; THUMB: mov pc, r0
+}
OpenPOWER on IntegriCloud