Dan Gohman | 3c7d308 | 2009-09-11 18:01:28 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -ipconstprop -S | grep {ret i32 %r} |
Chris Lattner | a77a73e | 2008-06-09 07:58:07 +0000 | [diff] [blame] | 2 | ; Should not propagate the result of a weak function. |
3 | ; PR2411 | ||||
4 | |||||
5 | define weak i32 @foo() nounwind { | ||||
6 | entry: | ||||
7 | ret i32 1 | ||||
8 | } | ||||
9 | |||||
10 | define i32 @main() nounwind { | ||||
11 | entry: | ||||
12 | %r = call i32 @foo( ) nounwind | ||||
13 | ret i32 %r | ||||
14 | } | ||||
15 |