From: Chris Lattner Date: Sat, 27 May 2006 01:16:22 +0000 (+0000) Subject: New testcase: check that the inliner constant folds instructions on the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f;p=oota-llvm.git 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 --- 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 +}