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 pow(x,0.0) = pow(1.0,y) = 1.0


On Thu, Feb 20, 2003 at 09:10:14PM -0700, Roger Sayle wrote:
> 	* fold-const.c (omit_one_operand): No longer static.
> 	* tree.h (omit_one_operand): Prototype here.
> 	(div_and_round_double): Keep fold-const.c prototypes together.
> 	* builtins.c (builtin_mathfn_code): Handle binary built-in
> 	funtions, such as "pow" and "atan2".
> 	(fold_builtin): Optimize both pow(x,0.0) and pow(1.0,y) to 1.0.
> 	Simplify optimizations using "type" the builtin's return type.
> 
> 	* gcc.dg/builtins-5.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]