blob: 257c0ee7deb29f91519dc63cc15240b32e164f68 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -globalsmodref-aa -gvn -S | not grep load
Tanya Lattnerdcd188d2008-02-14 06:56:27 +00002@X = internal global i32 4 ; <i32*> [#uses=2]
Chris Lattner059f5a52004-07-27 06:26:08 +00003
Tanya Lattnerdcd188d2008-02-14 06:56:27 +00004define i32 @test(i32* %P) {
5 store i32 12, i32* @X
6 call void @doesnotmodX( )
7 %V = load i32* @X ; <i32> [#uses=1]
8 ret i32 %V
Chris Lattner059f5a52004-07-27 06:26:08 +00009}
10
Tanya Lattnerdcd188d2008-02-14 06:56:27 +000011define void @doesnotmodX() {
12 ret void
Chris Lattner059f5a52004-07-27 06:26:08 +000013}