llvm-6502/test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll
Chris Lattner 18d73c206e 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
2008-06-09 07:58:07 +00:00

16 lines
296 B
LLVM

; 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
}