xref: /aosp_15_r20/external/llvm/test/Transforms/FunctionAttrs/readnone.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -functionattrs -S | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK: define void @bar(i8* nocapture readnone)
4*9880d681SAndroid Build Coastguard Workerdefine void @bar(i8* readonly) {
5*9880d681SAndroid Build Coastguard Worker  call void @foo(i8* %0)
6*9880d681SAndroid Build Coastguard Worker    ret void
7*9880d681SAndroid Build Coastguard Worker}
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; CHECK: define void @foo(i8* nocapture readnone)
10*9880d681SAndroid Build Coastguard Workerdefine void @foo(i8* readonly) {
11*9880d681SAndroid Build Coastguard Worker  call void @bar(i8* %0)
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker}
14