[PATCH] D52450: [Intrinsic] Add llvm.minnan and llvm.maxnan instrinsic functions

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 14:09:06 PDT 2018


tlively marked an inline comment as done.
tlively added inline comments.


================
Comment at: docs/LangRef.rst:11599
+means that llvm.minnan(+/-0.0, +/-0.0) could return either -0.0 or
+0.0.
+
----------------
sunfish wrote:
> Another thing that changed in IEEE 754-2018 is that unlike 754-2008's `minNum` and `maxNum`, 754-2018's `minimum`. `maximum`, `minimumNumber`, and `maximumNumber` are defined to treat `-0` as if it were less than `+0`. It'd be nice to adopt this new rule for these new intrinsics, however llvm.minnum already exists and doesn't follow this rule, and existing libm `fmin` and `fmax` implementations don't all follow this rule. So, it may not be practical to do so at this time. It'd be useful to mention this discrepancy with the 754-2018 rules here at least though.
Thanks, @sunfish! I've added notes about this.


Repository:
  rL LLVM

https://reviews.llvm.org/D52450





More information about the llvm-commits mailing list