diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-11-02 16:46:26 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-11-02 16:46:26 +0000 |
commit | 6feb333695f913cd7b525f9a2d5b887f4b0fca1f (patch) | |
tree | cbcbd587aa05a85ea5402a47d756acfb70b08aca /test/Transforms/MergeFunc | |
parent | e4915157303b6c61a653c8da1b7017ed089e51f8 (diff) |
Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
* don't reimplement CallSite::hasArgument
* whitelist the safe linkage types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/MergeFunc')
-rw-r--r-- | test/Transforms/MergeFunc/fold-weak.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/MergeFunc/fold-weak.ll b/test/Transforms/MergeFunc/fold-weak.ll new file mode 100644 index 0000000000..d98fde0228 --- /dev/null +++ b/test/Transforms/MergeFunc/fold-weak.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | opt -mergefunc | llvm-dis | grep {alias weak} | count 2 + +define weak i32 @sum(i32 %x, i32 %y) { + %sum = add i32 %x, %y + ret i32 %sum +} + +define weak i32 @add(i32 %x, i32 %y) { + %sum = add i32 %x, %y + ret i32 %sum +} |