[PATCH] PR 42327: Add checks for sqrt optab being present before doing pow (x, 0.75) optimization

Michael Meissner meissner@linux.vnet.ibm.com
Wed Dec 8 13:39:00 GMT 2010


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



More information about the Gcc-patches mailing list