This is the mail archive of the gcc-patches@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]

Re: [patch] for PR29921


Hi Zdenek,

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.

Thoughts?

Roger
--


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