2008-03-01 09:15:35 +00:00
|
|
|
; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
|
2004-10-07 19:16:26 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
@G = internal global i32 17 ; <i32*> [#uses=3]
|
2004-10-07 19:16:26 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @foo() {
|
|
|
|
store i32 17, i32* @G
|
|
|
|
ret void
|
2004-10-07 19:16:26 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|
|
|
|
define i32 @bar() {
|
|
|
|
%X = load i32* @G ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2004-10-07 19:16:26 +00:00
|
|
|
}
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define internal void @dead() {
|
|
|
|
store i32 123, i32* @G
|
|
|
|
ret void
|
2004-10-07 19:16:26 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|