|
|
| Bugzilla Link |
2411 |
| Resolution |
FIXED |
| Resolved on |
Sep 01, 2008 10:21 |
| Version |
unspecified |
| OS |
Linux |
| Depends On |
llvm/llvm-bugzilla-archive#2742 |
| Attachments |
Test case, Result of -ipconstprop |
| Reporter |
LLVM Bugzilla Contributor |
Extended Description
Interprocedural constant propagation (-ipconstprop) propagates the result of foo to main, regardless the weak attribute of foo:
define weak i32 @foo() nounwind {
entry:
ret i32 1
}
define i32 @main() nounwind {
entry:
%tmp1 = call i32 @foo( ) nounwind
ret i32 %tmp1
}
test.ll as attached is the test case and test-ipconstprop.ll is the result after applying "opt -ipconstprop".