This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA: 3.2] MMIX: Fix gcc.c-torture/execute/ieee/mzero2.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 19 Sep 2002 21:31:32 -0600 (MDT)
- Subject: Re: [RFA: 3.2] MMIX: Fix gcc.c-torture/execute/ieee/mzero2.c
> Question: Given that "-1.00 * pzero" can signal when using
> multiplication, but a negation is allowed not to, is it really
> correct to now translate it to a negation?
This transformation is disabled by -fsignaling-nans. Neither GCC
nor the C standard honor signaling NaNs by default, so I think
its reasonable to apply this optimization unless told not to.
As you point out, its the fact that sNaN negation is allowed not
to signal that forces us to disable this optimization, to preserve the
observable behaviour. If GCC knew that sNaN negation always trapped on
a particular target, it could always safely perform this transformation.
However I doubt there are enough performance critical uses of GCC's
"-fsignaling-nans" to warrant new target macros for neg and abs :>
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833