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: [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


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