This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/61494] -fsignaling-nans not taken into account for x - 0.0
- From: "pangbw at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Jun 2014 00:10:19 +0000
- Subject: [Bug rtl-optimization/61494] -fsignaling-nans not taken into account for x - 0.0
- Auto-submitted: auto-generated
- References: <bug-61494-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61494
baoshan <pangbw at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pangbw at gmail dot com
--- Comment #2 from baoshan <pangbw at gmail dot com> ---
Looking at the function simplify_binary_operation_1, I can see "!HONOR_SNANS
(mode)" has been added in a few places to prevent the incorrect transformation,
I believe to fix the issue we just add it to other places it should be there.
But the question is which place should we add this predication?
For case 1: "X - 0" to "X" we may say it is needed, but what about case 2:
"(X&C1)|C2" to "X|C2"? The quiet NaN would be generated but not in the original
location; if we think it is not needed I will think for the case 1 it is also
not needed because I believe the signaling 'X' would be used later and the
quite NaN would be generated eventually.
If we think for both of cases the predication is necessary, I would
think(suggest) every transformation in this function should be prohibited if
HONOR_SNANS (mode) is true.