2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -argpromotion -S | \
|
2012-07-03 03:09:46 +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
|
2015-02-28 05:17:42 +08:00
|
|
|
%X = load i32, i32* %P ; <i32> [#uses=1]
|
2008-03-01 17:15:35 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|