================ @@ -309,6 +309,60 @@ space casted to this space), 1 is returned, otherwise 0 is returned. Arithmetic Intrinsics --------------------- +'``llvm.nvvm.fabs.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +.. code-block:: llvm + + declare float @llvm.nvvm.fabs.f32(float %a) + declare double @llvm.nvvm.fabs.f64(double %a) + declare half @llvm.nvvm.fabs.f16(half %a) + declare <2 x half> @llvm.nvvm.fabs.v2f16(<2 x half> %a) + declare bfloat @llvm.nvvm.fabs.bf16(bfloat %a) + declare <2 x bfloat> @llvm.nvvm.fabs.v2bf16(<2 x bfloat> %a) + +Overview: +""""""""" + +The '``llvm.nvvm.fabs.*``' intrinsics return the absolute value of the operand. + +Semantics: +"""""""""" + +Unlike, '``llvm.fabs.*``', these intrinsics do not perfectly preserve NaN +values. Instead, a NaN input yeilds an unspecified NaN output. The exception to +this rule is the double precision variant, for which NaN is preserved. ---------------- AlexMaclean wrote:
Yea, this is a good point. I've updated the docs to remove the exception. A NaN will now always yield an unspecified NaN output. https://github.com/llvm/llvm-project/pull/135644 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits