2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -argpromotion -S | \
|
2012-07-02 19:09:46 +00:00
|
|
|
; RUN: not grep "load i32* null"
|
2004-11-13 23:28:39 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define internal i32 @callee(i1 %C, i32* %P) {
|
|
|
|
br i1 %C, label %T, label %F
|
2004-11-13 23:28:39 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
T: ; preds = %0
|
|
|
|
ret i32 17
|
|
|
|
|
|
|
|
F: ; preds = %0
|
2015-02-27 21:17:42 +00:00
|
|
|
%X = load i32, i32* %P ; <i32> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
ret i32 %X
|
2004-11-13 23:28:39 +00:00
|
|
|
}
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define i32 @foo() {
|
|
|
|
%X = call i32 @callee( i1 true, i32* null ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2004-11-13 23:28:39 +00:00
|
|
|
}
|
|
|
|
|