Skip to content
Snippets Groups Projects
user avatar
Roger Sayle authored
	* builtins.c (fold_builtin): Optimize cos(-x) as cos(x).
	* fold-const.c (fold <NEGATE_EXPR>): Convert -f(x) into f(-x)
	when x is easily negated and f is sin, tan or atan.
	(fold <MULT_EXPR>): Optimize tan(x)*cos(x) and cos(x)*tan(x) as
	sin(x) with flag_unsafe_math_optimizations.
	(fold <RDIV_EXPR>): With flag_unsafe_math_optimizations fold
	sin(x)/cos(x) as tan(x) and cos(x)/sin(x) as 1.0/tan(x).

	* gcc.dg/builtins-20.c: New test case.

From-SVN: r67701
9f0a7f9d
History
This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the file COPYING
for copying permission.  The manuals, and some of the runtime
libraries, are under different terms; see the individual source files
for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs.html for how to report bugs usefully.