[PATCH] Fix PR17687 sincos -> cexp canonicalization (2nd try)

Richard Guenther rguenther@suse.de
Sat Dec 9 18:03:00 GMT 2006


On Fri, 8 Dec 2006, Richard Guenther wrote:

> On Fri, 8 Dec 2006, Richard Guenther wrote:
> 
> > 
> > This moves canonicalization from gimplify to fold as requested and
> > adds folding of cexp as well (as requested).  To produce a testcase
> > for the latter I had to add some folding of complex expressions to
> > allow making cexp with an imaginary argument visible to fold.  Also
> > gcc.c-torture/execute/complex-1.c needs adjustment because it defines
> > its own cexp with different semantics.
> > 
> > Bootstrapped and tested on x86_64-unknown-linux-gnu,
> > 
> > ok for mainline?
> > 
> > Thanks,
> > Richard.
> > 
> > +       narglist = build_tree_list (NULL_TREE, arg);
> > +       narglist = tree_cons (NULL_TREE, top1, narglist);
> > +       narglist = tree_cons (NULL_TREE, top2, narglist);
> 
> That needs to read
> 
> +       narglist = build_tree_list (NULL_TREE, top2);
> +       narglist = tree_cons (NULL_TREE, top1, narglist);
> +       narglist = tree_cons (NULL_TREE, arg, narglist);
> 

SPEC2000 FP has mesa, equake, facerec, lucas, sixtrack and apsi
where this transformation applies.  It's noise apart from
sixtrack (+4%) and equake (+3%).

Richard.



More information about the Gcc-patches mailing list