llvm.org GIT mirror llvm / 3faa9ad
[FPEnv] Document that constrained FP intrinsics cannot be mixed with non-constrained Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand Approved by: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D67360 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371888 91177308-0d34-0410-b5e6-96231b3b80d8 Kevin P. Neal a month ago
1 changed file(s) with 16 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1506315063 accurately preserve exception behavior without compromising LLVM's ability to
1506415064 optimize FP code when the default behavior is used.
1506515065
15066 Each of these intrinsics corresponds to a normal floating-point operation. The
15067 first two arguments and the return value are the same as the corresponding FP
15066 If any FP operation in a function is constrained then they all must be
15067 constrained. This is required for correct LLVM IR. Optimizations that
15068 move code around can create miscompiles if mixing of constrained and normal
15069 operations is done. The correct way to mix constrained and less constrained
15070 operations is to use the rounding mode and exception handling metadata to
15071 mark constrained intrinsics as having LLVM's default behavior.
15072
15073 Each of these intrinsics corresponds to a normal floating-point operation. The
15074 data arguments and the return value are the same as the corresponding FP
1506815075 operation.
1506915076
15070 The third argument is a metadata argument specifying the rounding mode to be
15071 assumed. This argument must be one of the following strings:
15077 The rounding mode argument is a metadata string specifying what
15078 assumptions, if any, the optimizer can make when transforming constant
15079 values. Some constrained FP intrinsics omit this argument. If required
15080 by the intrinsic, this argument must be one of the following strings:
1507215081
1507315082 ::
1507415083
1509815107 non-dynamic rounding mode which does not match the actual rounding mode at
1509915108 runtime results in undefined behavior.
1510015109
15101 The fourth argument to the constrained floating-point intrinsics specifies the
15102 required exception behavior. This argument must be one of the following
15103 strings:
15110 The exception behavior argument is a metadata string describing the floating
15111 point exception semantics that required for the intrinsic. This argument
15112 must be one of the following strings:
1510415113
1510515114 ::
1510615115