aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Inline
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/Inline')
-rw-r--r--test/Transforms/Inline/inline-tail.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/Inline/inline-tail.ll b/test/Transforms/Inline/inline-tail.ll
new file mode 100644
index 0000000..f5eb629
--- /dev/null
+++ b/test/Transforms/Inline/inline-tail.ll
@@ -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
+}