2010-11-10 09:02:18 +08:00
|
|
|
; RUN: opt < %s -basicaa -functionattrs -S | grep readnone | count 4
|
2008-09-19 17:20:05 +08:00
|
|
|
@x = global i32 0
|
|
|
|
|
|
|
|
declare i32 @e() readnone
|
2008-09-03 23:31:24 +08:00
|
|
|
|
|
|
|
define i32 @f() {
|
|
|
|
%tmp = call i32 @e( ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
|
|
|
}
|
|
|
|
|
2008-09-19 17:20:05 +08:00
|
|
|
define i32 @g() readonly {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @h() readnone {
|
|
|
|
%tmp = load i32* @x ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
|
|
|
}
|