[llvm] [LLParser] Support identifiers like `qnan` and `pinf` for special FP values (PR #102790)
Joshua Cranmer via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 13:33:29 PDT 2024
================
@@ -4426,6 +4425,21 @@ represented by ``0xH`` followed by 4 hexadecimal digits. The bfloat 16-bit
format is represented by ``0xR`` followed by 4 hexadecimal digits. All
hexadecimal formats are big-endian (sign bit at the left).
+Some of the special floating point values can be represented by the following
+identifiers:
+
+ +-----------+---------------------------------------------------+
+ | Name | Description |
+ +===========+===================================================+
+ | ``qnan`` | Positive quiet NaN w/ payload equals to zero |
+ +-----------+---------------------------------------------------+
+ | ``snan`` | Positive signaling NaN w/ payload equals to zero |
----------------
jcranmer-intel wrote:
There is no sNaN with an all-0 payload, that would be an infinity instead--the payload needs to have some bit set to not be an infinity. qNaNs always have one bit set, but there is no requisite bit set for the sNaN.
https://github.com/llvm/llvm-project/pull/102790
More information about the llvm-commits
mailing list