From ba5c26da7ce85dbdcee3d964282e5f0981792702 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 5 Dec 2022 13:51:01 -0500 Subject: [PATCH] LangRef: Clarify semantics of lround/llround and lrint/llrint --- llvm/docs/LangRef.rst | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index c2c11f6..7ce635b 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -15082,8 +15082,10 @@ type. Semantics: """""""""" -This function returns the same values as the libm ``lround`` -functions would, but without setting errno. +This function returns the same values as the libm ``lround`` functions +would, but without setting errno. If the rounded value is too large to +be stored in the result type, the return value is a non-deterministic +value (equivalent to `freeze poison`). '``llvm.llround.*``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15118,7 +15120,9 @@ Semantics: """""""""" This function returns the same values as the libm ``llround`` -functions would, but without setting errno. +functions would, but without setting errno. If the rounded value is +too large to be stored in the result type, the return value is a +non-deterministic value (equivalent to `freeze poison`). '``llvm.lrint.*``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15159,8 +15163,10 @@ type. Semantics: """""""""" -This function returns the same values as the libm ``lrint`` -functions would, but without setting errno. +This function returns the same values as the libm ``lrint`` functions +would, but without setting errno. If the rounded value is too large to +be stored in the result type, the return value is a non-deterministic +value (equivalent to `freeze poison`). '``llvm.llrint.*``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15194,8 +15200,10 @@ type. Semantics: """""""""" -This function returns the same values as the libm ``llrint`` -functions would, but without setting errno. +This function returns the same values as the libm ``llrint`` functions +would, but without setting errno. If the rounded value is too large to +be stored in the result type, the return value is a non-deterministic +value (equivalent to `freeze poison`). Bit Manipulation Intrinsics --------------------------- -- 2.7.4