[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 07:08:51 PDT 2020


spatel added a comment.

In D88238#2300668 <https://reviews.llvm.org/D88238#2300668>, @spatel wrote:

> D87822 <https://reviews.llvm.org/D87822> landed recently ( cc @sepavloff ), so this patch is now failing on the clang tests with:
>
>   /Users/spatel/GitHub/llvm-project/clang/test/CodeGen/builtin-nan-legacy.c:6:3: error: initializer element is not a compile-time constant
>     __builtin_nan(""),
>     ^~~~~~~~~~~~~~~~~

I'm not sure what the correct fix will be. The cast from double to float in those tests is raising the exception (opInvalidOp) as expected. That then causes the new APFloat::opStatus check in checkFloatingPointResult() to trigger and cause the error/stop compiling.


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

https://reviews.llvm.org/D88238



More information about the llvm-commits mailing list