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] Optimize x+x+x+x+x+x as 6.0*x with -ffast-math.


On Sun, Aug 03, 2003 at 01:17:26PM -0600, Roger Sayle wrote:
> 	* fold-const.c (fold <PLUS_EXPR>): Transform x+x into x*2.0.
> 	Optimize x*c+x and x+x*c into x*(c+1) and x*c1+x*c2 into x*(c1+c2)
> 	for floating point expressions with -ffast-math.
> 	(fold <MULT_EXPR>): Don't transform x*2.0 into x+x.
> 	* expmed.c (expand_mult): Wrap long line.  Expand x*2.0 as x+x.
> 
> 	* gcc.dg/20030803-1.c: New test case.

Ok.


r~


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