New testcase: check that the inliner constant folds instructions on the
authorChris Lattner <sabre@nondot.org>
Sat, 27 May 2006 01:16:22 +0000 (01:16 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 May 2006 01:16:22 +0000 (01:16 +0000)
fly if it can.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28515 91177308-0d34-0410-b5e6-96231b3b80d8

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

diff --git a/test/Transforms/Inline/inline_constprop.ll b/test/Transforms/Inline/inline_constprop.ll
new file mode 100644 (file)
index 0000000..edfb090
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -inline -disable-output &&
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep callee &&
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep div
+
+implementation
+
+internal int %callee(int %A, int %B) {
+       %C = div int %A, %B
+       ret int %C
+}
+
+int %test() {
+       %X = call int %callee(int 10, int 3)
+       ret int %X
+}