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] Fix PR30028, fold sin, cos to sincos on the tree-level


On Thu, 7 Dec 2006, Andrew Pinski wrote:

> On Thu, 2006-12-07 at 19:27 +0100, Richard Guenther wrote:
> > +   /* sin, cos and cexpi may trap with non-finite math (+-Inf
> > arguments).  */
> > +   if (!flag_finite_math_only)
> > +     return; 
> 
> I think you should check for flag_trapping_math instead.

In this case !flag_finite_math_only && !flag_trapping_math would work
as well.  Or just do the work and find a more appropriate insertion
place for the cexpi call in the trapping case.

Richard.

> ; Zero means that floating-point math operations cannot generate a
> ; (user-visible) trap.  This is the case, for example, in nonstop
> ; IEEE 754 arithmetic.
> ftrapping-math
> Common Report Var(flag_trapping_math) Init(1)
> Assume floating-point operations can trap
> 
> 
> Thanks,
> Andrew Pinski
> 
> 

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs


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