2009-09-09 00:50:01 +08:00
|
|
|
; RUN: opt %s -globalopt | llvm-dis | not grep G
|
2004-11-15 04:41:39 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
@G = internal global i32 17 ; <i32*> [#uses=3]
|
2004-11-15 04:41:39 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define void @foo() {
|
|
|
|
%V = load i32* @G ; <i32> [#uses=1]
|
|
|
|
store i32 %V, i32* @G
|
2004-11-15 04:41:39 +08:00
|
|
|
ret void
|
|
|
|
}
|
2008-03-01 17:15:35 +08:00
|
|
|
|
|
|
|
define i32 @bar() {
|
|
|
|
%X = load i32* @G ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2004-11-15 04:41:39 +08:00
|
|
|
}
|
|
|
|
|