blob: 9783664a34ace3aa664164ae0af4006eaaad89d9 [file] [log] [blame]
Tanya Lattnerdcd188d2008-02-14 06:56:27 +00001; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
2@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}