This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: PR29335 use MPFR for builtin sincos
On 11/1/06, Kaveh R. GHAZI <firstname.lastname@example.org> wrote:
On Wed, 1 Nov 2006, Richard Guenther wrote:
> On 11/1/06, Kaveh R. GHAZI <email@example.com> wrote:
> > This patch uses MPFR for builtin sincos.
> > For a call like sincos(0.0,s,c), where "s" and "c" are pointers, I
> > transform this into e.g. "(void)(*s=0.0,*c=1.0)".
> > Bootstrapped on sparc-sun-solaris2.10, no regressions. The new testcases
> > all pass. In the transcendental accuracy testsuite, there is no sincos
> > test, however I was able to shoehorn the values used in the sin and cos
> > tests through builtin sincos and they all get "perfect" results.
> > Okay for mainline?
> This might transform a valid gimple statement into a non-gimple one - did
> you verify that the various places that might fold the statement correctly
> handle this case?
Sorry, how would I go about checking that? I mean ensuring *all* "the
various places that might fold the statement". I want to make sure I do
an exhaustive check.
The most obvious place is fold_stmt and the DOM pass. Then of course
the propagator engine and FRE/PRE folding. I would start with simple
double zero = 0.0;
sincos(zero, &s, &c);
to get the propagator engine folding after CCP. Then maybe generate
some testcases with control flow that move the folding possibility to later
passes. Otherwise an exhaustive check is difficult ;)