blob: 3c7b32d9d49b50f10b01bd12a4fcde3032babcf6 [file] [log] [blame]
Duncan Sandsa01febb2008-09-19 09:20:05 +00001; RUN: llvm-as < %s | opt -addreadattrs | llvm-dis | grep readnone | count 4
2@x = global i32 0
3
4declare i32 @e() readnone
Duncan Sands9f07a292008-09-19 08:17:05 +00005
6define i32 @f() {
Duncan Sands9f07a292008-09-19 08:17:05 +00007 %tmp = call i32 @e( ) ; <i32> [#uses=1]
8 ret i32 %tmp
9}
10
Duncan Sandsa01febb2008-09-19 09:20:05 +000011define i32 @g() readonly {
12 ret i32 0
13}
14
15define i32 @h() readnone {
16 %tmp = load i32* @x ; <i32> [#uses=1]
17 ret i32 %tmp
18}