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] More constant folding of math built-ins (take 2)


On Thu, May 29, 2003 at 07:09:25AM -0600, Roger Sayle wrote:
> 	* builtins.c (dconstpi, dconste): New mathematical constants.
> 	(init_builtin_dconsts): New function to initialize dconstpi
> 	and dconste.
> 	(fold_builtin): Optimize exp(1.0) = e.  Evaluate exp(x) at
> 	compile time with -ffast-math when x is an integer constant.
> 	Optimize tan(0.0) = 0.0.  Optimize atan(0.0) = 0.0,
> 	atan(1.0) = pi/4 and tan(atan(x)) = x with -ffast-math.
> 
> 	* gcc.dg/builtins-2.c: Add tests for tan(atan(x)).
> 	* gcc.dg/builtins-3.c: Add tests for tan(0.0) and atan(0.0).
> 	* gcc.dg/builtins-7.c: Add tests for tan(atan(x)) == x.
> 	* gcc.dg/builtins-17.c: New test case.
> 	* gcc.dg/i386-387-4.c: New test case.
> 	* gcc.c-torture/execute/ieee/mzero4.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]