This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] do not lower a/b to a*(1/b)
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 May 2005 07:48:16 -0400
- Subject: Re: [PATCH] do not lower a/b to a*(1/b)
- References: <428465A1.firstname.lastname@example.org>
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
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;