279aa8f685
Former-commit-id: 0c7ce5b1a7851e13f22acfd379b7f9fb304e4833
16 lines
278 B
LLVM
16 lines
278 B
LLVM
; RUN: opt < %s -ipconstprop -S | 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
|
|
}
|
|
|