In the block "Handle constant exponents." in gcc/builtins.c, the condition !optimize_size has been replaced with optimize_insn_for_speed_p () between gcc 4.3 and 4.4, but I have not been able to find when and why. Does anybody remembers the when and why?
This change make the optimization sensitive to PR40106 and unless it has compeling reasons it should be reverted in this piece of code. My second question is why using optimize_size? I think it would be better to define an upper bound instead of POWI_MAX_MULTS that depends on the kind of optimisation. I cannot see any situation in which sqrt(a) would not be better that pow(a,0.5) for speed, size, and accuracy. TIA Dominique