summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
blob: 35cb5342d8df208207aca6e6e89158ce47c3cb11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
; RUN: opt < %s -aa-pipeline=basic-aa -passes=function-attrs -S | FileCheck %s

; CHECK: define i32 @f() #0
define i32 @f() {
entry:
  %tmp = call i32 @e( )
  ret i32 %tmp
}

; CHECK: declare i32 @e() #0
declare i32 @e() readonly

; CHECK: attributes #0 = { readonly }
OpenPOWER on IntegriCloud