This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] do not lower a/b to a*(1/b)



On May 13, 2005, at 4:30 AM, Paolo Bonzini wrote:


This patch removes the hunk of expr.c that tries to lower a/b to a*(1/b) in the hope of CSEing the reciprocal and save a divide. This optimization is now part of loop-invariant motion thanks to a patch by David Edelsohn.

Bootstrapped/regtested powerpc-apple-darwin, ok for mainline?

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; }


Thanks, Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]