This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move sqrt and cbrt simplifications to match.pd
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 08 Oct 2015 17:55:07 +0100
- Subject: Re: Move sqrt and cbrt simplifications to match.pd
- Authentication-results: sourceware.org; auth=none
- References: <87k2r1bb0p dot fsf at e105548-lin dot cambridge dot arm dot com> <alpine dot DEB dot 2 dot 20 dot 1510061058140 dot 1720 at laptop-mg dot saclay dot inria dot fr>
Marc Glisse <marc.glisse@inria.fr> 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 @0))
>> + (pows @0 { build_real_truncate (type, dconst<1, 6> ()); }))
>
> I think you swapped the comments (not that it matters).
Thanks, fixed in the committed version.
Richard