blob: cad5a91488ab0af9aa909a3fe5cc50e6624df05f [file] [log] [blame]
Rafael Espindola03977292012-06-14 22:48:13 +00001; RUN: opt < %s -globalopt -S | FileCheck %s
Chris Lattner904697e2004-10-07 19:16:26 +00002
Rafael Espindola03977292012-06-14 22:48:13 +00003@G1 = internal global i32 123 ; <i32*> [#uses=1]
Chris Lattner904697e2004-10-07 19:16:26 +00004
Rafael Espindola03977292012-06-14 22:48:13 +00005; CHECK-NOT: @G1
6; CHECK: @G2
7; CHECK-NOT: @G3
8
9define void @foo1() {
10; CHECK: define void @foo
11; CHECK-NEXT: ret
12 store i32 1, i32* @G1
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000013 ret void
Chris Lattner904697e2004-10-07 19:16:26 +000014}
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000015
Rafael Espindola03977292012-06-14 22:48:13 +000016@G2 = linkonce_odr constant i32 42
17
18define void @foo2() {
19; CHECK: define void @foo2
20; CHECK-NEXT: store
21 store i32 1, i32* @G2
22 ret void
23}
24
25@G3 = linkonce_odr constant i32 42