This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67771] integer-to-floating-point conversions wrongly produce -0 in FE_DOWNWARD mode
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 13 Aug 2016 10:33:54 +0000
- Subject: [Bug target/67771] integer-to-floating-point conversions wrongly produce -0 in FE_DOWNWARD mode
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-67771-4@http.gcc.gnu.org/bugzilla/>
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.