[Bug middle-end/40106] [4.4/4.5 Regression] Weird interaction between optimize_insn_for_speed_p and -funsafe-math-optimizations

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Tue Mar 16 17:14:00 GMT 2010



------- 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



More information about the Gcc-bugs mailing list