aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Inline
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-24 05:02:26 +0000
committerChris Lattner <sabre@nondot.org>2003-08-24 05:02:26 +0000
commit66197a9d23ed47b300d8787fd903b58d70a91be9 (patch)
tree9f518426f50fd5ff9434b450fde4b5fba909e312 /test/Transforms/Inline
parent7152c237b46a920b29d5605af934766b8f9a07a1 (diff)
downloadexternal_llvm-66197a9d23ed47b300d8787fd903b58d70a91be9.zip
external_llvm-66197a9d23ed47b300d8787fd903b58d70a91be9.tar.gz
external_llvm-66197a9d23ed47b300d8787fd903b58d70a91be9.tar.bz2
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Inline')
-rw-r--r--test/Transforms/Inline/inline_dce.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/Inline/inline_dce.ll b/test/Transforms/Inline/inline_dce.ll
new file mode 100644
index 0000000..7299d36
--- /dev/null
+++ b/test/Transforms/Inline/inline_dce.ll
@@ -0,0 +1,25 @@
+; This checks to ensure that the inline pass deletes functions if they get
+; inlined into all of their callers.
+
+; RUN: as < %s | opt -inline | dis | not grep %reallysmall
+
+implementation
+
+internal int %reallysmall(int %A) {
+ ret int %A
+}
+
+void %caller1() {
+ call int %reallysmall(int 5)
+ ret void
+}
+
+void %caller2(int %A) {
+ call int %reallysmall(int %A)
+ ret void
+}
+
+int %caller3(int %A) {
+ %B = call int %reallysmall(int %A)
+ ret int %B
+}