Make sure to not accidentally get a bogus tail marker
authorChris Lattner <sabre@nondot.org>
Fri, 6 May 2005 06:47:37 +0000 (06:47 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 May 2005 06:47:37 +0000 (06:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21735 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/Inline/inline-tail.ll [new file with mode: 0644]

diff --git a/test/Transforms/Inline/inline-tail.ll b/test/Transforms/Inline/inline-tail.ll
new file mode 100644 (file)
index 0000000..f5eb629
--- /dev/null
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep tail
+
+implementation
+
+declare void %bar(int*)
+
+internal void %foo(int* %P) {  ;; to be inlined
+  tail call void %bar(int* %P)
+  ret void
+}
+
+void %caller() {
+       %A = alloca int
+       call void %foo(int* %A)   ;; not a tail call
+       ret void
+}