2012-06-14 22:48:13 +00:00
|
|
|
; RUN: opt < %s -globalopt -S | FileCheck %s
|
2004-10-07 19:16:26 +00:00
|
|
|
|
2012-06-14 22:48:13 +00:00
|
|
|
@G1 = internal global i32 123 ; <i32*> [#uses=1]
|
2004-10-07 19:16:26 +00:00
|
|
|
|
2012-06-14 22:48:13 +00:00
|
|
|
; CHECK-NOT: @G1
|
|
|
|
; CHECK: @G2
|
|
|
|
; CHECK-NOT: @G3
|
|
|
|
|
|
|
|
define void @foo1() {
|
|
|
|
; CHECK: define void @foo
|
|
|
|
; CHECK-NEXT: ret
|
|
|
|
store i32 1, i32* @G1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
@G2 = linkonce_odr constant i32 42
|
|
|
|
|
|
|
|
define void @foo2() {
|
2013-07-14 01:50:49 +00:00
|
|
|
; CHECK-LABEL: define void @foo2(
|
2012-06-14 22:48:13 +00:00
|
|
|
; CHECK-NEXT: store
|
|
|
|
store i32 1, i32* @G2
|
2008-03-01 09:15:35 +00:00
|
|
|
ret void
|
2004-10-07 19:16:26 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|
2012-06-14 22:48:13 +00:00
|
|
|
@G3 = linkonce_odr constant i32 42
|