2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -argpromotion -S | \
|
2008-05-01 23:50:07 +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
|
|
|
|
%X = load i32* %P ; <i32> [#uses=1]
|
|
|
|
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
|
|
|
}
|
|
|
|
|