2009-09-09 06:34:10 +08:00
|
|
|
; RUN: opt %s -argpromotion -S | \
|
2008-05-02 07:50:07 +08:00
|
|
|
; RUN: not grep {load i32\* null}
|
2004-11-14 07:28:39 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define internal i32 @callee(i1 %C, i32* %P) {
|
|
|
|
br i1 %C, label %T, label %F
|
2004-11-14 07:28:39 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
T: ; preds = %0
|
|
|
|
ret i32 17
|
|
|
|
|
|
|
|
F: ; preds = %0
|
|
|
|
%X = load i32* %P ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2004-11-14 07:28:39 +08:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define i32 @foo() {
|
|
|
|
%X = call i32 @callee( i1 true, i32* null ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2004-11-14 07:28:39 +08:00
|
|
|
}
|
|
|
|
|