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

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

diff --git a/test/Transforms/Inline/cfg_preserve_test.ll b/test/Transforms/Inline/cfg_preserve_test.ll
new file mode 100644 (file)
index 0000000..83179a0
--- /dev/null
@@ -0,0 +1,15 @@
+; This test ensures that inlining an "empty" function does not destroy the CFG
+;
+; RUN: as < %s | opt -inline | dis | not grep br
+
+int %func(int %i) {
+       ret int %i
+}
+
+declare void %bar()
+
+int %main(int %argc) {
+Entry:
+       %X = call int %func(int 7)
+       ret int %X
+}