summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2014-01-12 19:24:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2014-01-12 19:24:08 +0000
commit1995b9fead62f2f6c0ad217bd00ce3184f741fdb (patch)
tree4c32d2f33f2159e0733d79361f223e0cbb1b1610 /llvm/test/CodeGen/SPARC
parent9b435fec0d3bf83e063fe1b7bb3c180a8e6083f5 (diff)
downloadbcm5719-llvm-1995b9fead62f2f6c0ad217bd00ce3184f741fdb.tar.gz
bcm5719-llvm-1995b9fead62f2f6c0ad217bd00ce3184f741fdb.zip
Handle bundled terminators in isBlockOnlyReachableByFallthrough.
Targets like SPARC and MIPS have delay slots and normally bundle the delay slot instruction with the corresponding terminator. Teach isBlockOnlyReachableByFallthrough to find any MBB operands on bundled terminators so SPARC doesn't need to specialize this function. llvm-svn: 199061
Diffstat (limited to 'llvm/test/CodeGen/SPARC')
-rw-r--r--llvm/test/CodeGen/SPARC/missinglabel.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/missinglabel.ll b/llvm/test/CodeGen/SPARC/missinglabel.ll
new file mode 100644
index 00000000000..bcf384b7ad2
--- /dev/null
+++ b/llvm/test/CodeGen/SPARC/missinglabel.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -verify-machineinstrs | FileCheck %s
+target datalayout = "E-m:e-i64:64-n32:64-S128"
+target triple = "sparc64-unknown-linux-gnu"
+
+define void @f() align 2 {
+entry:
+; CHECK: %xcc, .LBB0_1
+ %cmp = icmp eq i64 undef, 0
+ br i1 %cmp, label %targetblock, label %cond.false
+
+cond.false:
+ unreachable
+
+; CHECK: .LBB0_1: ! %targetblock
+targetblock:
+ br i1 undef, label %cond.false.i83, label %exit.i85
+
+cond.false.i83:
+ unreachable
+
+exit.i85:
+ unreachable
+}
OpenPOWER on IntegriCloud