Re: Move sqrt and cbrt simplifications to match.pd

2015-10-12 Thread Christophe Lyon
On 9 October 2015 at 18:17, Richard Sandiford wrote: > Richard Sandiford writes: >> Christophe Lyon writes: >>> On 8 October 2015 at 18:55, Richard Sandiford >>> wrote: Marc Glisse writes: > On Mon, 5 Oct 2015, Richard Sandiford wrote: > >> + /* cbrt(sqrt(x)) -> pow(x,1/6).

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-12 Thread Richard Biener
On Fri, Oct 9, 2015 at 6:17 PM, Richard Sandiford wrote: > Richard Sandiford writes: >> Christophe Lyon writes: >>> On 8 October 2015 at 18:55, Richard Sandiford >>> wrote: Marc Glisse writes: > On Mon, 5 Oct 2015, Richard Sandiford wrote: > >> + /* cbrt(sqrt(x)) -> pow(x,1/6

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-09 Thread Richard Sandiford
Richard Sandiford writes: > Christophe Lyon writes: >> On 8 October 2015 at 18:55, Richard Sandiford >> wrote: >>> Marc Glisse writes: On Mon, 5 Oct 2015, Richard Sandiford wrote: > + /* cbrt(sqrt(x)) -> pow(x,1/6). */ > + (simplify > + (sqrts (cbrts @0)) > + (p

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-09 Thread Richard Sandiford
Christophe Lyon writes: > On 8 October 2015 at 18:55, Richard Sandiford > wrote: >> Marc Glisse writes: >>> On Mon, 5 Oct 2015, Richard Sandiford wrote: >>> + /* cbrt(sqrt(x)) -> pow(x,1/6). */ + (simplify + (sqrts (cbrts @0)) + (pows @0 { build_real_truncate (type, d

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-09 Thread Christophe Lyon
On 8 October 2015 at 18:55, Richard Sandiford wrote: > Marc Glisse writes: >> On Mon, 5 Oct 2015, Richard Sandiford wrote: >> >>> + /* cbrt(sqrt(x)) -> pow(x,1/6). */ >>> + (simplify >>> + (sqrts (cbrts @0)) >>> + (pows @0 { build_real_truncate (type, dconst<1, 6> ()); })) >>> + /* sqrt(c

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-08 Thread Richard Sandiford
Marc Glisse writes: > On Mon, 5 Oct 2015, Richard Sandiford wrote: > >> + /* cbrt(sqrt(x)) -> pow(x,1/6). */ >> + (simplify >> + (sqrts (cbrts @0)) >> + (pows @0 { build_real_truncate (type, dconst<1, 6> ()); })) >> + /* sqrt(cbrt(x)) -> pow(x,1/6). */ >> + (simplify >> + (cbrts (sqrts

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-06 Thread Marc Glisse
On Mon, 5 Oct 2015, Richard Sandiford wrote: + /* cbrt(sqrt(x)) -> pow(x,1/6). */ + (simplify + (sqrts (cbrts @0)) + (pows @0 { build_real_truncate (type, dconst<1, 6> ()); })) + /* sqrt(cbrt(x)) -> pow(x,1/6). */ + (simplify + (cbrts (sqrts @0)) + (pows @0 { build_real_truncate (t

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-06 Thread Richard Biener
On Mon, Oct 5, 2015 at 5:17 PM, Richard Sandiford wrote: > This patch moves the sqrt and cbrt simplification rules to match.pd. > builtins.c now only does the constant folding. > > Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Ok (once prerequesites are approved). People

Move sqrt and cbrt simplifications to match.pd

2015-10-05 Thread Richard Sandiford
This patch moves the sqrt and cbrt simplification rules to match.pd. builtins.c now only does the constant folding. Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_sqrt, fold_builtin_cbrt): Delete. (fold_built