Files
clang-p2996/llvm/test/Transforms/InferFunctionAttrs/readonly_and_writeonly.ll
Benjamin Kramer 5f0a349738 Revert "Revert "[InferAttrs] Add writeonly to all the math functions""
This reverts commit 29b6e967f3. The bug it
found in PartiallyInlineLibCalls was fixed in
c8ffc73350.
2022-01-05 12:16:35 +01:00

9 lines
415 B
LLVM

; RUN: opt < %s -mtriple=x86_64-- -passes=inferattrs -S | FileCheck --match-full-lines %s
; Frontends can emit math functions with 'readonly', don't crash on it.
; CHECK: declare double @acos(double) [[NOFREE_NOUNWIND_WILLRETURN_READNONE:#[0-9]+]]
declare double @acos(double) readonly
; CHECK-DAG: attributes [[NOFREE_NOUNWIND_WILLRETURN_READNONE]] = { mustprogress nofree nosync nounwind readnone willreturn }