[llvm-bugs] [Bug 46811] ARM isnormal(long double NaN) raises invalid

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 22 17:20:05 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46811

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #3 from Richard Smith <richard-llvm at metafoo.co.uk> ---
OK, I see the same thing if I use __builtin_isnormal instead:
https://godbolt.org/z/37M8PG -- in particular, the `fcmp`s we generate can set
FE_INVALID on NaN.

On x86_64, those `fcmp`s are replaced by constrained FP intrinsics:
https://godbolt.org/z/GK9Ejh

So this is another duplicate of 46799: this code was compiled assuming the
default floating point environment and that FP exceptions would not be
inspected. Use of <fenv.h> facilities from that environment is undefined, and
in this case that's manifesting as isnormal setting a floating point exception.

*** This bug has been marked as a duplicate of bug 46799 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200723/8b6b3624/attachment.html>


More information about the llvm-bugs mailing list