From 10e5a0a09ff8530b2410a4eef63fdb38cad7e0cd Mon Sep 17 00:00:00 2001 From: "Kevin P. Neal" Date: Thu, 26 Sep 2019 17:50:25 +0000 Subject: [PATCH] Document requirement of function attributes with constrained floating point. Reviewed by: andrew.w.kaylor, uweigand, efriedma Approved by: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D67839 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373002 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 59c4469fb9f..5e2d627d886 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -1786,7 +1786,8 @@ example: requires strict floating-point semantics. LLVM will not attempt any optimizations that require assumptions about the floating-point rounding mode or that might alter the state of floating-point status flags that - might otherwise be set or cleared by calling this function. + might otherwise be set or cleared by calling this function. LLVM will + not introduce any new floating-point instructions that may trap. ``"thunk"`` This attribute indicates that the function will delegate to some other function with a tail call. The prototype of a thunk should not be used for @@ -15155,6 +15156,17 @@ example, a series of FP operations that each may raise exceptions may be vectorized into a single instruction that raises each unique exception a single time. +Required Function Attributes: +""""""""""""""""""""""""""""" + +Proper :ref:`function attributes ` usage is required for the +constrained intrinsics to function correctly. + +All function *calls* done in a function that uses constrained floating +point intrinsics must have the ``strictfp`` attribute. + +All function *definitions* that use constrained floating point intrinsics +must have the ``strictfp`` attribute. '``llvm.experimental.constrained.fadd``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- 2.50.1