[PATCH] D88238: [APFloat] convert SNaN to QNaN in convert() and raise Invalid signal

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 06:32:18 PDT 2020


spatel added a comment.

In D88238#2295903 <https://reviews.llvm.org/D88238#2295903>, @efriedma wrote:

> Ooh, the MIPS case is weird...
>
> Apparently someone, a while back, made a halfhearted effort at supporting the old MIPS NaN encoding, which reverses the distinction between SNaNs and QNaNs.  See http://reviews.llvm.org/D7882 .  Of course, it doesn't really work because constant folding doesn't understand the reversal.
>
> Probably you should change clang/test/CodeGen/mips-unsupported-nan.c so it doesn't truncate the result of __builtin_nan().  Otherwise, you're not really making any more broken than it is already.

Thanks for digging that up. I'll add code/comments to explain.


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

https://reviews.llvm.org/D88238



More information about the llvm-commits mailing list