This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: PR29335 use MPFR for builtin sincos
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Nov 2006 10:03:59 -0500 (EST)
- Subject: Re: [PATCH]: PR29335 use MPFR for builtin sincos
- References: <Pine.LNX.email@example.com>
On Wed, 1 Nov 2006, Roger Sayle wrote:
> On Wed, 1 Nov 2006, Kaveh R. GHAZI wrote:
> > Is there any other testcase you would like me to try or can I install
> > the patch?
> The patch is OK for mainline. It would also be nice if you could
> turn the sincos(zero,&s,&c) test case into something suitable for
> GCC's dejagnu testsuite and check that in. And just for good luck
> perhaps something like:
> void foo(double x)
> double s, c;
> if (x == 0.0)
> /* Check s and c. */
> However these new test cases can be committed as a follow-up patch.
> We've no reason to believe the tree-ssa passes can't handle the new
> non-gimple (*sp=X, *cp=Y) idiom that sincos folding can now produce,
> but it does no harm as to make sure things don't break in future.
> [I'll admit that I'm a bit curious as to which pass actually performs
> the simplification you tested for, but it'll be easy enough for me
> to investigate this for myself once your patch goes in. :-)]
Sure I'll add some tests in a bit. Two notes:
1. In the case above, the simplification occurs only with both -O1 (or
higher) and -ffast-math. I'm not sure why -ffast-math is necessary.
2. The simplification is not dependent on sincos or the pointer
parameters. E.g. if you replace sincos with sin(x) the same set of
flags are necessary to enable the simplification.
Thanks for the review,
Kaveh R. Ghazi firstname.lastname@example.org