llvm-project/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
Arthur Eubanks 9433bacc73 [test] Fix some func-attrs tests under the legacy PM
The new PM doesn't visit declarations in CGSCC passes. These tests
aren't testing that detail, so just run them against the new PM.
2021-04-27 13:07:56 -07:00

15 lines
314 B
LLVM

; 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() #1
declare i32 @e() readonly
; CHECK: attributes #0 = { nofree readonly }
; CHECK: attributes #1 = { readonly }