https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78851

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> I don't think that the middle-end converts pow(, int-valued) to powi anywhere
> as generally the result can be off too far (maybe we could for some known
> special values).

For pow(x, 2.), we always get a multiplication. With -ffast-math, all pow(x,
(double)int_cst) are converted to a sequence of multiplications (I just tried
with pow(x,123456789) which gives a sequence of 37 multiplications at -O1
-ffast-math). But with pow(x,(double)int_var), we don't generate a call to
__powidf2, even a combination of -Os -ffast-math calls __pow_finite instead.

Reply via email to