------- Comment #23 from bonzini at gnu dot org  2006-01-03 15:30 -------
> For PowerPC, it is effective to use the instruction if
> there are multiple divides, such as the three divisions mentioned above.  The
> IBM XLC compiler propagates the reciprocal and numerator pair through its
> equivalent to RTL.

I am not sure I follow you.  I see two questions, but it could be that you
asked neither:

1) You want to use the reciprocal instruction instead of a FP divide.  This
could be done in the expander, or with a new RECIP_EXPR tree code.  I'd rather
do the former.

2) Multiplying by the result of the reciprocal instruction always provides the
exact result of the division, so you want to enable the pass always.  It could
be possible to parameterize the recip pass on a separate
-fdivide-by-reciprocals flag, turned on by -funsafe-math-optimization, but also
always turned on in config/rs6000/rs6000.c


-- 


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


Reply via email to