blob: 7bcb08df37c9bf8d4585a036b667af82fbe71778 [file] [log] [blame]
Dan Gohman3e054fe2009-09-08 22:34:10 +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}