Changeset View
Changeset View
Standalone View
Standalone View
llvm/docs/LangRef.rst
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 14,461 Lines • ▼ Show 20 Lines | |||||
"""""""""" | """""""""" | ||||
Return the same value as a corresponding libm '``fma``' function but without | Return the same value as a corresponding libm '``fma``' function but without | ||||
trapping or setting ``errno``. | trapping or setting ``errno``. | ||||
When specified with the fast-math-flag 'afn', the result may be approximated | When specified with the fast-math-flag 'afn', the result may be approximated | ||||
using a less accurate calculation. | using a less accurate calculation. | ||||
.. _int_fabs: | |||||
'``llvm.fabs.*``' Intrinsic | '``llvm.fabs.*``' Intrinsic | ||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
Syntax: | Syntax: | ||||
""""""" | """"""" | ||||
This is an overloaded intrinsic. You can use ``llvm.fabs`` on any | This is an overloaded intrinsic. You can use ``llvm.fabs`` on any | ||||
floating-point or vector of floating-point type. Not all targets support | floating-point or vector of floating-point type. Not all targets support | ||||
▲ Show 20 Lines • Show All 4,649 Lines • ▼ Show 20 Lines | .. code-block:: llvm | ||||
%r = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %a, <4 x i1> %mask, i32 %evl) | %r = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %a, <4 x i1> %mask, i32 %evl) | ||||
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r | ;; For all lanes below %evl, %r is lane-wise equivalent to %also.r | ||||
%t = fneg <4 x float> %a | %t = fneg <4 x float> %a | ||||
%also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef | %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef | ||||
.. _int_vp_fabs: | |||||
'``llvm.vp.fabs.*``' Intrinsics | |||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |||||
Syntax: | |||||
""""""" | |||||
This is an overloaded intrinsic. | |||||
:: | |||||
declare <16 x float> @llvm.vp.fabs.v16f32 (<16 x float> <op>, <16 x i1> <mask>, i32 <vector_length>) | |||||
declare <vscale x 4 x float> @llvm.vp.fabs.nxv4f32 (<vscale x 4 x float> <op>, <vscale x 4 x i1> <mask>, i32 <vector_length>) | |||||
declare <256 x double> @llvm.vp.fabs.v256f64 (<256 x double> <op>, <256 x i1> <mask>, i32 <vector_length>) | |||||
Overview: | |||||
""""""""" | |||||
Predicated floating-point absolute value of a vector of floating-point values. | |||||
Arguments: | |||||
"""""""""" | |||||
The first operand and the result have the same vector of floating-point type. | |||||
The second operand is the vector mask and has the same number of elements as the | |||||
result vector type. The third operand is the explicit vector length of the | |||||
operation. | |||||
Semantics: | |||||
"""""""""" | |||||
The '``llvm.vp.fabs``' intrinsic performs floating-point absolute value | |||||
(:ref:`fabs <int_fabs>`) of the first vector operand on each enabled lane. The | |||||
result on disabled lanes is undefined. | |||||
Examples: | |||||
""""""""" | |||||
.. code-block:: llvm | |||||
%r = call <4 x float> @llvm.vp.fabs.v4f32(<4 x float> %a, <4 x i1> %mask, i32 %evl) | |||||
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r | |||||
%t = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a) | |||||
%also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef | |||||
.. _int_vp_fma: | .. _int_vp_fma: | ||||
'``llvm.vp.fma.*``' Intrinsics | '``llvm.vp.fma.*``' Intrinsics | ||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
Syntax: | Syntax: | ||||
""""""" | """"""" | ||||
This is an overloaded intrinsic. | This is an overloaded intrinsic. | ||||
▲ Show 20 Lines • Show All 6,164 Lines • Show Last 20 Lines |