diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b122fd352eaf5..52ecff051dae3 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -21080,6 +21080,53 @@ Example: %c = call i8 @llvm.fptosi.sat.i8.f32(float 999.0) ; yields i8: 127 %d = call i8 @llvm.fptosi.sat.i8.f32(float 0xFFF8000000000000) ; yields i8: 0 +Floating-Point Conversion Intrinsics +------------------------------------ + +This class of intrinsics is designed for floating-point conversions that do +not fall into other categories. For example conversions with specified rounding +mode or mini-float conversions. + +'``llvm.fptrunc.round``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.fptrunc.round( , metadata ) + +Overview: +""""""""" + +The '``llvm.fptrunc.round``' intrinsic truncates +:ref:`floating-point ` ``value`` to type ``ty2`` +with a specified rounding mode. + +Arguments: +"""""""""" + +The '``llvm.fptrunc.round``' intrinsic takes a :ref:`floating-point +` value to cast and a :ref:`floating-point ` type +to cast it to. This argument must be larger in size than the result. + +The second argument specifies the rounding mode as described in the constrained +intrinsics section. +For this intrinsic, the "round.dynamic" mode is not supported. + +Semantics: +"""""""""" + +The '``llvm.fptrunc.round``' intrinsic casts a ``value`` from a larger +:ref:`floating-point ` type to a smaller :ref:`floating-point +` type. +This intrinsic is assumed to execute in the default :ref:`floating-point +environment ` *except* for the rounding mode. +This intrinsic is not supported on all targets. Some targets may not support +all rounding modes. + Convergence Intrinsics ---------------------- @@ -31123,42 +31170,3 @@ Semantics: The '``llvm.preserve.struct.access.index``' intrinsic produces the same result as a getelementptr with base ``base`` and access operands ``{0, gep_index}``. -'``llvm.fptrunc.round``' Intrinsic -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Syntax: -""""""" - -:: - - declare - @llvm.fptrunc.round( , metadata ) - -Overview: -""""""""" - -The '``llvm.fptrunc.round``' intrinsic truncates -:ref:`floating-point ` ``value`` to type ``ty2`` -with a specified rounding mode. - -Arguments: -"""""""""" - -The '``llvm.fptrunc.round``' intrinsic takes a :ref:`floating-point -` value to cast and a :ref:`floating-point ` type -to cast it to. This argument must be larger in size than the result. - -The second argument specifies the rounding mode as described in the constrained -intrinsics section. -For this intrinsic, the "round.dynamic" mode is not supported. - -Semantics: -"""""""""" - -The '``llvm.fptrunc.round``' intrinsic casts a ``value`` from a larger -:ref:`floating-point ` type to a smaller :ref:`floating-point -` type. -This intrinsic is assumed to execute in the default :ref:`floating-point -environment ` *except* for the rounding mode. -This intrinsic is not supported on all targets. Some targets may not support -all rounding modes.