gcc/gcc ChangeLog fold-const.c tree.h builtins ...

sayle@gcc.gnu.org sayle@gcc.gnu.org
Thu Feb 10 04:48:00 GMT 2005


CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2005-02-09 21:56:35

Modified files:
	gcc            : ChangeLog fold-const.c tree.h builtins.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: builtins-48.c builtins-49.c builtins-50.c 
	                      builtins-51.c 

Log message:
	* fold-const.c (fold_strip_sign_ops): New function to simplify a
	floating point expression ignoring the sign of the result.
	(fold) <ABS_EXPR>: Use it to simplify fabs(x).
	(fold) <MULT_EXPR>: Use it to simplify x*x.
	* tree.h (fold_strip_sign_ops): Prototype here.
	* builtins.c (fold_builtin_copysign): Take an additional FNDECL
	argument.  Use fold_strip_sign_ops to simplify the first argument.
	(fold_builtin_pow):  Use fold_strip_sign_ops to simplify the
	first argument when the second argument is an even integer
	constant, but only with -funsafe_math_optimizations.
	(fold_builtin_1): Update call to fold_builtin_copysign.
	
	* gcc.dg/builtins-48.c: New test case.
	* gcc.dg/builtins-49.c: New test case.
	* gcc.dg/builtins-50.c: New test case.
	* gcc.dg/builtins-51.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7425&r2=2.7426
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.503&r2=1.504
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.685&r2=1.686
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&r1=1.417&r2=1.418
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5009&r2=1.5010
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-48.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-49.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-50.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-51.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



More information about the Gcc-cvs mailing list