aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/TailCallElim/notail.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/TailCallElim/notail.ll')
-rw-r--r--test/Transforms/TailCallElim/notail.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/TailCallElim/notail.ll b/test/Transforms/TailCallElim/notail.ll
new file mode 100644
index 000000000000..e6fdbd1ec77d
--- /dev/null
+++ b/test/Transforms/TailCallElim/notail.ll
@@ -0,0 +1,24 @@
+; RUN: opt < %s -tailcallelim -S | FileCheck %s
+
+; CHECK: tail call void @callee0()
+; CHECK: notail call void @callee1()
+
+define void @foo1(i32 %a) {
+entry:
+ %tobool = icmp eq i32 %a, 0
+ br i1 %tobool, label %if.else, label %if.then
+
+if.then:
+ call void @callee0()
+ br label %if.end
+
+if.else:
+ notail call void @callee1()
+ br label %if.end
+
+if.end:
+ ret void
+}
+
+declare void @callee0()
+declare void @callee1()