------- Comment #24 from dje at gcc dot gnu dot org  2006-01-03 15:50 -------
Comment #21 mentions three divisions for the optimization to be more
profitable, but that information is lost by the time GCC reaches the expanders.
Minimally, it would be helpful to know that the reciprocal optimization found
more than three divides.

If the backend knew that it were calculating a reciprocal instead of 1./x
division and that the reciprocal only occurs when more than two divides are
present, it could produce better code.

For both PowerPC and IA-64, it would be helpful to have RECIP_EXPR and the pair
that completes division because both archtectures could then explicitly use
their reciprocal instructions and fully schedule the Newton-Raphson or
power-series expansion for the closure instead of generating the 1./x
reciprocal as a full divide and the lower accuracy, isolated numerator
multiplication separately.

If the backends had more complete information, the reciprocal optimization
could be extended beyond -ffast-math for some targets.


-- 


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


Reply via email to