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