From 5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 May 2006 01:16:22 +0000 Subject: [PATCH] New testcase: check that the inliner constant folds instructions on the 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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/Transforms/Inline/inline_constprop.ll diff --git a/test/Transforms/Inline/inline_constprop.ll b/test/Transforms/Inline/inline_constprop.ll new file mode 100644 index 00000000000..edfb0905f91 --- /dev/null +++ b/test/Transforms/Inline/inline_constprop.ll @@ -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 +} -- 2.34.1