diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-09 07:58:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-09 07:58:07 +0000 |
commit | a77a73efa3773167893a676484ca6af50fd8ae7f (patch) | |
tree | 11bf9dfa8d76033f80ca964d827c5aa7df09b5be /test/Transforms/IPConstantProp | |
parent | bbce2e4a5090e2f888896a8e44d0db633aa894cf (diff) | |
download | external_llvm-a77a73efa3773167893a676484ca6af50fd8ae7f.zip external_llvm-a77a73efa3773167893a676484ca6af50fd8ae7f.tar.gz external_llvm-a77a73efa3773167893a676484ca6af50fd8ae7f.tar.bz2 |
Fix PR2411, where ip constant prop would propagate the
result of a weak function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IPConstantProp')
-rw-r--r-- | test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll b/test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll new file mode 100644 index 0000000..fc7e3bb --- /dev/null +++ b/test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | opt -ipconstprop | llvm-dis | grep {ret i32 %r} +; Should not propagate the result of a weak function. +; PR2411 + +define weak i32 @foo() nounwind { +entry: + ret i32 1 +} + +define i32 @main() nounwind { +entry: + %r = call i32 @foo( ) nounwind + ret i32 %r +} + |