This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 42327: Add checks for sqrt optab being present before doing pow (x, 0.75) optimization
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, jakub at redhat dot com
- Date: Wed, 8 Dec 2010 06:57:31 -0500
- Subject: Re: [PATCH] PR 42327: Add checks for sqrt optab being present before doing pow (x, 0.75) optimization
- References: <20101207173857.GA14620@hungry-tiger.westford.ibm.com> <4CFF6064.4050700@gnu.org>
On Wed, Dec 08, 2010 at 11:39:32AM +0100, Paolo Bonzini wrote:
> On 12/07/2010 06:38 PM, Michael Meissner wrote:
> > * builtins.c (expand_builtin_pow_root): Don't optimize pow(x,y)
> > where y is 0.25, 1./6., or 0.75 if the target does not have a sqrt
> > instruction, but do optimize if y is 0.5 or 1./6. since that
> ^^^^^
>
> Did you mean 1./3. here?
>
> > changes an expensive call into a cheaper one.
Yes.
--
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com fax +1 (978) 399-6899