Fix PR2792: treat volatile loads as writing memory somewhere.

Treat stores as reading memory, just to play safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2008-09-13 12:45:50 +00:00
parent 2aa0e649bf
commit b8ca4ff643
2 changed files with 20 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
; RUN: llvm-as < %s | opt -globalsmodref-aa -markmodref | llvm-dis | not grep read
; PR2792
@g = global i32 0 ; <i32*> [#uses=1]
define i32 @f() {
%t = volatile load i32* @g ; <i32> [#uses=1]
ret i32 %t
}