[patch] Use FPU for integer division on Alpha
Falk Hueffner
falk@debian.org
Sat Mar 19 15:20:00 GMT 2005
Paul Koning <pkoning@equallogic.com> writes:
> I thought the DEC compiler also generated a check for small divisors
> (less than 256 or so) and would handle those my EMUL by the reciprocal
> -- exactl as GCC already does for constant divisors.
No, it doesn't. Its division routine does, though. I'm not sure it's
worth doing, especially on EV6 where the inlined FPU routine takes
only about 35 cycles, while a cache miss can be quite expensive. In
any case, this should rather be added at a higher level, similar to
the value profile based modulo optimizations.
--
Falk
More information about the Gcc-patches
mailing list