[PATCH] D67507: Refer to IEEE 754-2019 in langref instead of 2018 draft

Stuart Brady via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 11:21:51 PDT 2019


stuart added inline comments.


================
Comment at: docs/LangRef.rst:12185
 
 Follows the IEEE-754 semantics for minNum, except for handling of
 signaling NaNs. This match's the behavior of libm's fmin.
----------------
stuart wrote:
> majnemer wrote:
> > minNum -> minimumNumber
> I believe that we should say //minNum// here, as this refers to the //old// IEEE 754-2008 //minNum// semantics, and not the //new// IEEE 754-2019 //minumumNumber// semantics.  That is to say, the `llvm.minnum.*` intrinsics have been deliberately kept with the IEEE 754-2008 semantics, and new intrinsics named `llvm.minimum.*` have been added for IEEE 754-2019 semantics.
> 
> That said, IMO, this should be updated to refer to IEEE 754-2008 explicitly in all places.
> 
> If we intend to update the 9.0.0 docs, should this be part of the update?
Correction: I now realise that the new NaN-propagating operations in IEEE 754-2019 are actually named //minimum// and //maximum//, not //minimumNumber// and //maximumNumber//. We should explicitly mention the names of these operations in the documentation for the `llvm.minimum.*` and `llvm.maximum.*` intrinsics, below.

However, IEEE 754-2019 //also// adds "number-favoring" operations named //minimumNumber// and //maximumNumber// that are broadly the same as //minNum// and //maxNum//, but alter the semantics regarding sNaNs. I am not aware of the semantics for the `llvm.minnum.*` and `llvm.maxnum.*` intrinsics having been changed to those of the IEEE 754-2019 //minimumNumber// and //maximumNumber// operations, though, so I am still not certain of this change.

Should the `llvm.minnum.*` and `llvm.maxnum.*` intrinsics be documented as undefined as to whether they have the semantics of the //either// the IEEE 754-2008 //minNum// and //maxNum// operations //or// the IEEE 754-2019 //minimumNumber// and //maximumNumber// operations, or should this explicitly reference the semantics of the IEEE 754-2008 //minNum// and //maxNum// operations, or should this explicitly reference the semantics of the IEEE 754-2019 //minimumNumber// and //maximumNumber// operations?

If the change in this review is acceptable, then I would suggest that the changes for `llvm.minnum.*` and `llvm.maxnum.*` can be done in a subsequent review, but we do need to determine what changes will be required.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67507/new/

https://reviews.llvm.org/D67507





More information about the llvm-commits mailing list