https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89256
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97282#c1 for one example how this could be done for small integers (base 10 in that case). The solution with the precomputed tables is probably not feasible for larger divisors. It might also be interesting to see what would happen in efficiency if the library routines from libgcc were inlined.