------- Comment #45 from dominiq at lps dot ens dot fr  2010-03-16 17:13 -------
> -Os optimizes for size current translation unit, it doesn't (nor easily can)
> guess whether or not you are linking libm.a or libm.so and whether in the
> former case using a call would be the only place that calls some routine (when
> linking against shared library of course this doesn't make any sense, you
> always get it).

Yes, indeed! However I am pretty sure that expanding pow(x,n) as an optimal
sequence of multiply will always be a win (speed, size and accuracy) for at
least 8<n<15, i.e., a few multiplies on targets with hard-floats, and so on for
n/2.0 and n/3.0. 

Now one of my concern related to this pr is that I don't know how to use at the
same time generic optimization and keep x*sqrt(x) instead of pow(x,1.5) if I
know that for my target this is the right thing to do.

Now I think it is important to answer my questions when and why in
http://gcc.gnu.org/ml/gcc/2010-03/msg00179.html .


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40106

Reply via email to