Go to file
Jakub Jelinek 576714b309 phiopt: Optimize x < 0 ? ~y : y to (x >> 31) ^ y [PR96928]
As requested in the PR, the one's complement abs can be done more
efficiently without cmov or branching.

Had to change the ifcvt-onecmpl-abs-1.c testcase, we no longer optimize
it in ifcvt, on x86_64 with -m32 we generate in the end the exact same
code, but with -m64:
        movl    %edi, %eax
-       notl    %eax
-       cmpl    %edi, %eax
-       cmovl   %edi, %eax
+       sarl    $31, %eax
+       xorl    %edi, %eax
        ret

2021-01-05  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/96928
	* tree-ssa-phiopt.c (xor_replacement): New function.
	(tree_ssa_phiopt_worker): Call it.

	* gcc.dg/tree-ssa/pr96928.c: New test.
	* gcc.target/i386/ifcvt-onecmpl-abs-1.c: Remove -fdump-rtl-ce1,
	instead of scanning rtl dump for ifcvt message check assembly
	for xor instruction.
2021-01-05 16:35:22 +01:00
c++tools build: libcody: Link with -lsocket -lnsl if necessary [PR98316] 2021-01-05 11:32:31 +01:00
config build: libcody: Link with -lsocket -lnsl if necessary [PR98316] 2021-01-05 11:32:31 +01:00
contrib Daily bump. 2021-01-05 00:16:42 +00:00
fixincludes Daily bump. 2020-12-15 00:16:35 +00:00
gcc phiopt: Optimize x < 0 ? ~y : y to (x >> 31) ^ y [PR96928] 2021-01-05 16:35:22 +01:00
gnattools
gotools Daily bump. 2020-12-31 00:16:29 +00:00
include Update copyright years. 2021-01-04 10:26:59 +01:00
INSTALL
intl intl: Unbreak intl build with bison 3 when no regeneration is needed [PR92008] 2020-04-16 11:55:00 +02:00
libada Update copyright years. 2021-01-04 10:26:59 +01:00
libatomic Update copyright years. 2021-01-04 10:26:59 +01:00
libbacktrace Update copyright years. 2021-01-04 10:26:59 +01:00
libcc1 Update copyright years. 2021-01-04 10:26:59 +01:00
libcody Daily bump. 2021-01-05 00:16:42 +00:00
libcpp Update copyright years. 2021-01-04 10:26:59 +01:00
libdecnumber Update copyright years. 2021-01-04 10:26:59 +01:00
libffi Daily bump. 2020-12-06 00:16:44 +00:00
libgcc Update copyright years. 2021-01-04 10:26:59 +01:00
libgfortran Update copyright years. 2021-01-04 10:26:59 +01:00
libgo internal/cpu: add aarch64 support functions 2021-01-01 15:13:50 -08:00
libgomp Update copyright years. 2021-01-04 10:26:59 +01:00
libhsail-rt Update copyright years. 2021-01-04 10:26:59 +01:00
libiberty Daily bump. 2021-01-05 00:16:42 +00:00
libitm Update copyright years. 2021-01-04 10:26:59 +01:00
libobjc Update copyright years. 2021-01-04 10:26:59 +01:00
liboffloadmic Daily bump. 2020-11-30 00:16:27 +00:00
libphobos Update copyright years. 2021-01-04 10:26:59 +01:00
libquadmath Daily bump. 2021-01-02 00:16:24 +00:00
libsanitizer Daily bump. 2020-12-06 00:16:44 +00:00
libssp Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-v3 Update copyright years. 2021-01-04 10:26:59 +01:00
libvtv Update copyright years. 2021-01-04 10:26:59 +01:00
lto-plugin Update copyright years. 2021-01-04 10:26:59 +01:00
maintainer-scripts Daily bump. 2020-12-17 00:16:37 +00:00
zlib Daily bump. 2020-12-06 00:16:44 +00:00
.dir-locals.el .dir-locals.el: Set 'fill-column' to 80 for c-mode 2020-12-14 12:19:56 +01:00
.gitattributes Add *.md diff=md. 2020-01-15 14:29:53 +01:00
.gitignore Sync .gitignore with binutils-gdb 2020-12-02 11:04:01 -07:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-01-05 00:16:42 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in config-ml.in: Suppress output from multi-do recipes 2020-11-09 14:28:37 +00:00
config.guess config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
config.rpath
config.sub config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
configure Add C++tools 2020-12-15 07:42:59 -08:00
configure.ac Add C++tools 2020-12-15 07:42:59 -08:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 Darwin : Update libtool and dependencies for Darwin20 [PR97865] 2020-12-05 08:43:20 +00:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh Do not use HAVE_DOS_BASED_FILE_SYSTEM for Cygwin. 2020-04-17 09:22:51 +02:00
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Update my email address. 2021-01-04 17:37:54 +01:00
Makefile.def Add C++tools 2020-12-15 07:42:59 -08:00
Makefile.in Add C++tools 2020-12-15 07:42:59 -08:00
Makefile.tpl Add C++tools 2020-12-15 07:42:59 -08:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

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.