2013-02-11 16:34:57 +08:00
|
|
|
; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
|
2018-03-24 05:46:16 +08:00
|
|
|
; RUN: opt < %s -aa-pipeline=basic-aa -passes=function-attrs -S | FileCheck %s
|
2008-09-03 20:55:42 +08:00
|
|
|
|
2013-02-20 15:21:42 +08:00
|
|
|
; CHECK: define i32 @f() #0
|
2008-09-03 20:55:42 +08:00
|
|
|
define i32 @f() {
|
|
|
|
entry:
|
2013-02-11 16:34:57 +08:00
|
|
|
%tmp = call i32 @e( )
|
|
|
|
ret i32 %tmp
|
2008-09-03 20:55:42 +08:00
|
|
|
}
|
|
|
|
|
2013-02-20 15:21:42 +08:00
|
|
|
; CHECK: declare i32 @e() #0
|
2008-09-03 20:55:42 +08:00
|
|
|
declare i32 @e() readonly
|
2013-02-20 15:21:42 +08:00
|
|
|
|
|
|
|
; CHECK: attributes #0 = { readonly }
|