[PATCH] Fix PR25620, pow() expansion missed-optimization, 2nd try
Richard Guenther
rguenther@suse.de
Mon Nov 13 11:51:00 GMT 2006
On Mon, 13 Nov 2006, Richard Guenther wrote:
> On Sun, 12 Nov 2006, Roger Sayle wrote:
>
> >
> > Hi Richard,
> >
> > On Sun, 12 Nov 2006, Richard Guenther wrote:
> > > Bootstrapped and regtested on x86_64-unknown-linux-gnu. SPEC 2k
> > > doesn't show a difference, Polyhedron has an improvement for air
> > > (down from 21s to 16.5s runtime).
> >
> > Cool! I hadn't appreciated this had such a significant impact on
> > polyhedron.
> >
> >
> > This is much better, thanks. However, there are still a number of
> > (new) issues that need to be resolved.
> >
> > The first is a potential bug...
> >
> > > ! expand_simple_binop (mode, MULT, op, op2, op, 0, OPTAB_DIRECT);
> >
> > The expand_binop, and expand_simple_binop, APIs treat their target
> > argument as a hint. Hence the return result of expand_simple_binop
> > isn't guaranteed to be in target_rtx. Hence you need to use
> >
> > op = expand_simple_binop (....)
>
> Whoops. Looks like I have to fix some of the i386 rounding expanders
> as well here...
One other thing here is when to use OPTAB_DIRECT vs. other methods. I
see that expand_powi for creating the reciprocal uses OPTAB_LIB_WIDEN -
does this mean that for example on soft-float targets OPTAB_DIRECT will
"fail" and so we need OPTAB_LIB_WIDEN?
Thanks,
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
More information about the Gcc-patches
mailing list