This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PR29921
- From: Roger Sayle <roger at eyesopen dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Nov 2006 15:40:05 -0700 (MST)
- Subject: Re: [patch] for PR29921
On Tue, 21 Nov 2006, Zdenek Dvorak wrote:
> PR tree-optimization/29921
> * fold-const.c (operand_equal_p): Without HONOR_SIGNED_ZEROS, consider
> signed and unsigned zero equal.
> * gcc.dg/pr29921.c: New test.
Interesting. This is OK for mainline. But I think it would also be
a good idea to attempt to canonicalize -0.0 as 0.0 in the middle-end
when we are not honoring signed zeros. There are several places
where transformations see that tree arg0 and arg1 are operand_equal_p
and then arbitrarily choose to use arg0 or arg1. Although, this
shouldn't cause a problem, I think it would be nicer if we could
canonicalize trees such that later optimizers aren't surprised by
them choosing -0.0. For example, on x87 we could probably also use
fldz to load -0.0 when using -ffast-math.