diff --git a/test/Transforms/AddReadAttrs/2008-09-03-ReadNone.ll b/test/Transforms/AddReadAttrs/2008-09-03-ReadNone.ll index 32719020040..3c7b32d9d49 100644 --- a/test/Transforms/AddReadAttrs/2008-09-03-ReadNone.ll +++ b/test/Transforms/AddReadAttrs/2008-09-03-ReadNone.ll @@ -1,9 +1,18 @@ -; RUN: llvm-as < %s | opt -addreadattrs | llvm-dis | grep readnone | count 2 +; RUN: llvm-as < %s | opt -addreadattrs | llvm-dis | grep readnone | count 4 +@x = global i32 0 + +declare i32 @e() readnone define i32 @f() { -entry: %tmp = call i32 @e( ) ; [#uses=1] ret i32 %tmp } -declare i32 @e() readnone +define i32 @g() readonly { + ret i32 0 +} + +define i32 @h() readnone { + %tmp = load i32* @x ; [#uses=1] + ret i32 %tmp +}