blob: f84725a3859c6c41b28463edad2e65749cf48434 [file] [log] [blame]
Dan Gohmanb1e1e822009-09-08 16:50:01 +00001; RUN: opt %s -globalsmodref-aa -gvn | llvm-dis | 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}