blob: 54a65d61da37317497e5ae78c89e19b9ff361ab9 [file] [log] [blame]
Chandler Carruth4177e6f2012-07-02 12:47:22 +00001; RUN: opt < %s -ipconstprop -S | grep "ret i32 %r"
Chris Lattner18d73c22008-06-09 07:58:07 +00002; Should not propagate the result of a weak function.
3; PR2411
4
5define weak i32 @foo() nounwind {
6entry:
7 ret i32 1
8}
9
10define i32 @main() nounwind {
11entry:
12 %r = call i32 @foo( ) nounwind
13 ret i32 %r
14}
15