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: