This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fast Copysign for PPC, -flag_unsafe_math_optimizationsonly
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Pinskia <pinskia at physics dot uc dot edu>
- Date: Sun, 30 Jan 2005 17:01:00 -0700 (MST)
- Subject: Re: [PATCH] fast Copysign for PPC, -flag_unsafe_math_optimizationsonly
On Sun, 30 Jan 2005, Richard Henderson wrote:
> On Sun, Jan 30, 2005 at 07:12:40PM -0500, Andrew Pinski wrote:
> > With this patch copysign is expanded to:
> > fabs f0,f1
> > fnabs f1,f1
> > fsel f1,f2,f0,f1
> >
> > Which is faster and smaller than storing and doing
> > bitfield operations on the sign bit.
>
> I would be surprised if this ever gets used, but the proper
> test is HONOR_SIGNED_ZEROS, not flag_unsafe_math_optimizations.
Except for in back-ends, which shouldn't need to check which of their
floating point modes support signed zeros, in which case the usual
HONOR_SIGNED_ZEROS test reduces to flag_unsafe_math_optimizations.
Roger
--