blob: 3a02a94a99b55c5b149555c6d2698b1e4bcad6c4 [file] [log] [blame]
Dan Gohmanc1be92f2010-10-18 18:04:47 +00001; RUN: opt < %s -basicaa -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}