Go to file
Richard Sandiford abcc43f532 Move cabs simplifications to match.pd
The fold code also expanded cabs(x+yi) to fsqrt(x*x+y*y) when optimising
for speed.  tree-ssa-math-opts.c has this transformation too, but unlike
the fold code, it first checks whether the target implements the sqrt
optab.  The patch simply removes the fold code and keeps the
tree-ssa-math-opts.c logic the same.

gcc.dg/lto/20110201-1_0.c was relying on us replacing cabs
with fsqrt even on targets where fsqrt is itself a library call.
The discussion leading up to that patch suggested that we only
want to test the fold on targets with a square root instruction,
so it would be OK to skip the test on other targets:

        https://gcc.gnu.org/ml/gcc-patches/2011-07/msg01961.html
        https://gcc.gnu.org/ml/gcc-patches/2011-07/msg02036.html

The patch does that using the sqrt_insn effective target.

It's possible that removing the tree folds renders the LTO trick
unnecessary, but since the test was originally for an ICE, it seems
better to leave it as-is.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
20110201-1_0.c passes on all three.

gcc/
	* builtins.c (fold_builtin_cabs): Delete.
	(fold_builtin_1): Update accordingly.  Handle constant arguments here.
	* match.pd: Add rules previously handled by fold_builtin_cabs.

gcc/testsuite/
	* gcc.dg/lto/20110201-1_0.c: Restrict to sqrt_insn targets.
	Add associated options for arm*-*-*.
	(sqrt): Remove dummy definition.

From-SVN: r229141
2015-10-21 20:19:25 +00:00
boehm-gc Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
config libsanitizer merge from upstream r250806, compiler part. 2015-10-21 10:40:54 +03:00
contrib Make sure that contrib/download_prerequisites is run from correct place 2015-09-11 06:09:36 +00:00
fixincludes inclhack.def (aix_stdio_inline): New fix. 2015-08-14 07:17:29 -04:00
gcc Move cabs simplifications to match.pd 2015-10-21 20:19:25 +00:00
gnattools configure.ac (*-*-dragonfly*): New configuration. 2015-06-08 07:27:56 +00:00
gotools gotools: Bump to automake 1.11.6 2015-05-13 10:59:14 +00:00
include Fix PR63758 by using the _NSGetEnviron() API on Darwin 2015-10-18 10:33:37 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
intl Makefile.def (libiconv): Define bootstrap=true. 2015-08-07 01:13:52 -04:00
libada re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) 2015-04-10 06:43:52 +00:00
libatomic Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
libbacktrace posix.c (backtrace_open): Cast second argument of open() to int. 2015-09-17 13:08:04 -04:00
libcc1 hash-traits.h (free_ptr_hash): New class. 2015-06-25 17:06:24 +00:00
libcilkrts libcilkrts: Bump to automake 1.11.6 2015-05-13 11:01:24 +00:00
libcpp [PATCH 1/9] ENABLE_CHECKING refactoring 2015-10-13 15:31:48 -06:00
libdecnumber IA MCU psABI support: changes to libraries 2015-06-30 09:42:07 -07:00
libffi [RS6000] Correct powerpc sysv stack argument accounting 2015-10-01 06:59:00 +09:30
libgcc divmodqi.S: Return 0x00 by default for div by 0. 2015-10-16 17:47:07 -04:00
libgfortran re PR libfortran/67527 (io.h sanitizer complains on 1 << 31) 2015-09-12 12:05:44 +00:00
libgo Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
libgomp reduction-5.c: Set sane vector_length. 2015-10-20 21:09:09 +00:00
libiberty Fix PR63758 by using the _NSGetEnviron() API on Darwin 2015-10-18 10:33:37 +00:00
libitm Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
libjava configure.ac (tools/gjdoc): Depend on CREATE_WRAPPERS. 2015-08-11 19:59:25 +02:00
libmpx re PR other/66887 (trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem) 2015-10-15 09:26:39 +00:00
libobjc stop including tm.h in sendmsg.c 2015-09-12 22:19:11 +00:00
liboffloadmic builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
libquadmath Makefile.am (libquadmath_la_SOURCES): Add math/logbq.c. 2015-08-09 08:46:52 +00:00
libsanitizer HOWTO_MERGE: New file. 2015-10-21 10:53:22 +03:00
libssp libssp: Bump to automake 1.11.6 2015-05-13 11:12:39 +00:00
libstdc++-v3 Document options for Filesystem TS library 2015-10-16 14:55:12 +01:00
libvtv Enable VTV for aarch64 and arm 2015-10-20 10:39:30 +00:00
lto-plugin configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. 2015-07-02 10:30:07 +02:00
maintainer-scripts update_version_svn: Add gcc-4_8-branch to IGNORE_BRANCHES. 2015-06-23 07:48:06 +00:00
zlib zlib: Bump to automake 1.11.6 2015-05-13 11:31:32 +00:00
.dir-locals.el
.gitignore Local Vim config with GNU formatting. 2014-12-09 13:45:47 +00:00
ABOUT-NLS
ChangeLog Add --enable-compressed-debug-sections={all,gas,gold,ld} 2015-10-20 09:29:28 -07:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
config.guess * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
config.rpath
config.sub * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
configure Add --enable-compressed-debug-sections={all,gas,gold,ld} 2015-10-20 09:29:28 -07:00
configure.ac Add --enable-compressed-debug-sections={all,gas,gold,ld} 2015-10-20 09:29:28 -07:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS * MAINTAINERS: Update list of Ada maintainers and email addresses. 2015-10-16 12:48:32 +02:00
Makefile.def re PR libfortran/54572 (Use libbacktrace library) 2015-08-23 21:50:30 +00:00
Makefile.in re PR libfortran/54572 (Use libbacktrace library) 2015-08-23 21:50:30 +00:00
Makefile.tpl revert: configure.ac: Add -std=c++98 to stage1_cxxflags. 2015-05-21 13:05:33 -04:00
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
README
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with 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/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.