xref: /llvm-project/llvm/test/Transforms/InferFunctionAttrs/readonly_and_writeonly.ll (revision 304f1d59ca41872c094def3aee0a8689df6aa398)
1; RUN: opt < %s -mtriple=x86_64-- -passes=inferattrs -S | FileCheck --match-full-lines %s
2
3; Frontends can emit math functions with 'readonly', don't crash on it.
4
5; CHECK: declare double @acos(double) [[NOFREE_NOUNWIND_WILLRETURN_READNONE:#[0-9]+]]
6declare double @acos(double) readonly
7
8; CHECK-DAG: attributes [[NOFREE_NOUNWIND_WILLRETURN_READNONE]] = { mustprogress nofree nosync nounwind willreturn memory(none) }
9