diff options
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/readnone.ll')
-rw-r--r-- | llvm/test/Transforms/FunctionAttrs/readnone.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/readnone.ll b/llvm/test/Transforms/FunctionAttrs/readnone.ll new file mode 100644 index 00000000000..b5a5b30ae21 --- /dev/null +++ b/llvm/test/Transforms/FunctionAttrs/readnone.ll @@ -0,0 +1,14 @@ +; RUN: opt < %s -functionattrs -S | FileCheck %s +; RUN: opt < %s -passes=function-attrs -S | FileCheck %s + +; CHECK: define void @bar(i8* nocapture readnone) +define void @bar(i8* readonly) { + call void @foo(i8* %0) + ret void +} + +; CHECK: define void @foo(i8* nocapture readnone) +define void @foo(i8* readonly) { + call void @bar(i8* %0) + ret void +} |