[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
Tue Sep 29 14:20:31 PDT 2020


spatel added a comment.

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

>> So unless there's a way to raise opInvalidOp without also creating a NaN, we're stuck?
>
> Maybe you can divide by zero?  Otherwise, I agree, we can't split this into a separate patch.

div-by-zero has its own status bit set in IEEEFloat::divideSpecials():

  case PackCategoriesIntoKey(fcNormal, fcZero):
    category = fcInfinity;
    return opDivByZero;
  
   

> But in any case, we should have some test coverage outside the MIPS-specific testcases.

Ok - I think the tests will necessarily be similar (FP cast) to what we have already, but we can remove the added complexity of the MIPS option.


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

https://reviews.llvm.org/D88238



More information about the llvm-commits mailing list