https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93934

--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Ah, indeed. fld won't raise FE_INVALID for 80-bit long double, but here
'result' is stored on the stack in 64-bit format.

So: fcmov and 80-bit fldt don't trap, 32-bit flds and 64-bit fldl do.

Somehow RTL if-conversion would have to check "-fsignaling-nans is requested
and the target may raise FE_INVALID on loads" among other reason to reject a
speculative load.

I am afraid though that several other optimizations do not anticipate that x87
fp loads can raise exceptions on SNaNs either, making -fsignaling-nans
difficult to implement in full.

Reply via email to