This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] do not lower a/b to a*(1/b)
We still don't do it for straight line code on the tree level.
For an example:
double f(double a, double b, double c)
return a/c + b/c;
I know, but the biggest benefit is to do it in loops; a function such as
f will hopefully be inlined (and if in a loop, we'll optimize it).
extract_muldiv could easily be improved to handle this; right now, I
believe that the code in expr.c does more harm than good.