diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-09 08:26:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-09 08:26:51 +0000 |
commit | 313f0e63f7c751e2ef6b2dbc163f1b68d2bcc4c8 (patch) | |
tree | ec00123234a1da65891fa85fb55983d4b699846e /test/Transforms/SimplifyLibCalls | |
parent | 18d73c206e8259de61abf54d8d0f47c0e54f42aa (diff) | |
download | external_llvm-313f0e63f7c751e2ef6b2dbc163f1b68d2bcc4c8.zip external_llvm-313f0e63f7c751e2ef6b2dbc163f1b68d2bcc4c8.tar.gz external_llvm-313f0e63f7c751e2ef6b2dbc163f1b68d2bcc4c8.tar.bz2 |
lower calls to abs to inline code, PR2337
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls')
-rw-r--r-- | test/Transforms/SimplifyLibCalls/abs.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/abs.ll b/test/Transforms/SimplifyLibCalls/abs.ll new file mode 100644 index 0000000..520189b --- /dev/null +++ b/test/Transforms/SimplifyLibCalls/abs.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep {select i1 %ispos} +; PR2337 + +define i32 @test(i32 %x) { +entry: + %call = call i32 @abs( i32 %x ) ; <i32> [#uses=1] + ret i32 %call +} + +declare i32 @abs(i32) + |