This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/67771] integer-to-floating-point conversions wrongly produce -0 in FE_DOWNWARD mode


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]