New testcase
authorChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 05:02:26 +0000 (05:02 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 05:02:26 +0000 (05:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8100 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/Inline/inline_dce.ll [new file with mode: 0644]

diff --git a/test/Transforms/Inline/inline_dce.ll b/test/Transforms/Inline/inline_dce.ll
new file mode 100644 (file)
index 0000000..7299d36
--- /dev/null
@@ -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
+}