[PATCH] D67360: [FPEnv] Document that constrained FP intrinsics cannot be mixed with non-constrained
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 09:24:52 PDT 2019
kpn updated this revision to Diff 219937.
kpn added a comment.
Address review comment. Mention the possibility of the restrictions mentioned here changing in the future, but don't make any promises.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67360/new/
https://reviews.llvm.org/D67360
Files:
docs/LangRef.rst
Index: docs/LangRef.rst
===================================================================
--- docs/LangRef.rst
+++ docs/LangRef.rst
@@ -15051,11 +15051,18 @@
accurately preserve exception behavior without compromising LLVM's ability to
optimize FP code when the default behavior is used.
+If any FP operation in a function is constrained then they all must be
+constrained. This is required for correct LLVM IR. There are currently no
+FP barrier instructions in LLVM IR, and optimizations that move code around
+can create miscompiles if mixing of constrained and normal operations is
+done. This restriction may be relaxed in the future, but for now must be
+followed.
+
Each of these intrinsics corresponds to a normal floating-point operation. The
-first two arguments and the return value are the same as the corresponding FP
+first arguments and the return value are the same as the corresponding FP
operation.
-The third argument is a metadata argument specifying the rounding mode to be
+The next argument is a metadata argument specifying the rounding mode to be
assumed. This argument must be one of the following strings:
::
@@ -15086,7 +15093,7 @@
non-dynamic rounding mode which does not match the actual rounding mode at
runtime results in undefined behavior.
-The fourth argument to the constrained floating-point intrinsics specifies the
+The last argument to the constrained floating-point intrinsics specifies the
required exception behavior. This argument must be one of the following
strings:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67360.219937.patch
Type: text/x-patch
Size: 1537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190912/0f206e17/attachment.bin>
More information about the llvm-commits
mailing list