diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-27 01:16:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-27 01:16:22 +0000 |
commit | 5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f (patch) | |
tree | 5eadb2e4df0678bfa84ddc466a7c833e972131c8 /test/Transforms/Inline | |
parent | 729c6d1da87ad5b3bf849c4102b255657f67276c (diff) | |
download | external_llvm-5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f.zip external_llvm-5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f.tar.gz external_llvm-5ca32a6d6c2fadbc12a3cad49c2f86f62596ae4f.tar.bz2 |
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
Diffstat (limited to 'test/Transforms/Inline')
-rw-r--r-- | test/Transforms/Inline/inline_constprop.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/Inline/inline_constprop.ll b/test/Transforms/Inline/inline_constprop.ll new file mode 100644 index 0000000..edfb090 --- /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 +} |