[Bug target/67771] integer-to-floating-point conversions wrongly produce -0 in FE_DOWNWARD mode
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Aug 13 10:34:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67771
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-08-13
Ever confirmed|0 |1
--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
One thing we can do (if we have fsel, which we also do not always have, it
needs TARGET_PPC_GFXOPT) is to put after this sequence, that returns rX
correct except it might return -0 while it should be +0:
fabs rT,rX
fsel rX,rX,rX,rT
(and don't do this if we have the requisite fast-math flags).
I'm not sure how to do this (cheaply) without fsel.
More information about the Gcc-bugs
mailing list