summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/Transforms/Inline/inline_unreachable-2.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/inline_unreachable-2.ll b/llvm/test/Transforms/Inline/inline_unreachable-2.ll
new file mode 100644
index 00000000000..57f090effc5
--- /dev/null
+++ b/llvm/test/Transforms/Inline/inline_unreachable-2.ll
@@ -0,0 +1,19 @@
+; RUN: opt < %s -inline -S | FileCheck %s
+
+; CHECK-LABEL: caller
+; CHECK: call void @callee
+define void @caller(i32 %a, i1 %b) #0 {
+ call void @callee(i32 %a, i1 %b)
+ unreachable
+}
+
+define void @callee(i32 %a, i1 %b) {
+ call void asm sideeffect "", ""()
+ br i1 %b, label %bb1, label %bb2
+bb1:
+ call void asm sideeffect "", ""()
+ ret void
+bb2:
+ call void asm sideeffect "", ""()
+ ret void
+}
OpenPOWER on IntegriCloud