Skip to content

Commit 875d20b

Browse files
committed
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 llvm-svn: 373002
1 parent 22d225a commit 875d20b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

llvm/docs/LangRef.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,8 @@ example:
17861786
requires strict floating-point semantics. LLVM will not attempt any
17871787
optimizations that require assumptions about the floating-point rounding
17881788
mode or that might alter the state of floating-point status flags that
1789-
might otherwise be set or cleared by calling this function.
1789+
might otherwise be set or cleared by calling this function. LLVM will
1790+
not introduce any new floating-point instructions that may trap.
17901791
``"thunk"``
17911792
This attribute indicates that the function will delegate to some other
17921793
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
1515515156
vectorized into a single instruction that raises each unique exception a single
1515615157
time.
1515715158

15159+
Required Function Attributes:
15160+
"""""""""""""""""""""""""""""
15161+
15162+
Proper :ref:`function attributes <fnattrs>` usage is required for the
15163+
constrained intrinsics to function correctly.
15164+
15165+
All function *calls* done in a function that uses constrained floating
15166+
point intrinsics must have the ``strictfp`` attribute.
15167+
15168+
All function *definitions* that use constrained floating point intrinsics
15169+
must have the ``strictfp`` attribute.
1515815170

1515915171
'``llvm.experimental.constrained.fadd``' Intrinsic
1516015172
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)