[PATCH] D69773: [APFloat] Extend converting from special strings

Ehud Katz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 22:48:43 PST 2019


ekatz added a comment.

In D69773#1752248 <https://reviews.llvm.org/D69773#1752248>, @efriedma wrote:

> Are you trying to match some specific grammar here?
>
> We use string->float conversion in a bunch of places, including places where the grammar is specified by some external standard; I'm a little concerned we could be accidentally extending the user-visible grammar in some context.  (Maybe those places account for this issue already?  Not sure.)


There is no unified syntax for those "specials"; but these are pretty acceptable representations that I added.
Some are pretty straight forward, like the case of NaN: we had "nan" and "NaN", in many places (in the web) you may see references to it as "NAN", so why not support it as well?
Others are extensions, so we may express "Signaling NaN" or explicit "Quiet NaN". And of course, there is the payload. Why not support it?

I think it is a welcoming extension to LLVM, while Clang (and other frontends) doesn't (and shouldn't) rely on the formats allowed by APFloat, but by its own restrictions.


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

https://reviews.llvm.org/D69773





More information about the llvm-commits mailing list