llvm.org GIT mirror llvm / release_25 test / Transforms / IPConstantProp / 2008-06-09-WeakProp.ll
release_25

Tree @release_25 (Download .tar.gz)

2008-06-09-WeakProp.ll @release_25raw · history · blame

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