Go to file
Tamar Christina d70720c238 middle-end: convert negate + right shift into compare greater.
This turns an inversion of the sign bit + arithmetic right shift into a
comparison with 0.

i.e.

void fun1(int32_t *x, int n)
{
    for (int i = 0; i < (n & -16); i++)
      x[i] = (-x[i]) >> 31;
}

now generates:

.L3:
        ldr     q0, [x0]
        cmgt    v0.4s, v0.4s, #0
        str     q0, [x0], 16
        cmp     x0, x1
        bne     .L3

instead of:

.L3:
        ldr     q0, [x0]
        neg     v0.4s, v0.4s
        sshr    v0.4s, v0.4s, 31
        str     q0, [x0], 16
        cmp     x0, x1
        bne     .L3

gcc/ChangeLog:

	* match.pd: New negate+shift pattern.

gcc/testsuite/ChangeLog:

	* gcc.dg/signbit-2.c: New test.
	* gcc.dg/signbit-3.c: New test.
	* gcc.dg/signbit-4.c: New test.
	* gcc.dg/signbit-5.c: New test.
	* gcc.dg/signbit-6.c: New test.
	* gcc.target/aarch64/signbit-1.c: New test.
2021-11-04 17:32:09 +00:00
c++tools Daily bump. 2021-10-27 00:16:33 +00:00
config
contrib Add -v option for git_check_commit.py. 2021-11-04 15:01:52 +01:00
fixincludes
gcc middle-end: convert negate + right shift into compare greater. 2021-11-04 17:32:09 +00:00
gnattools Daily bump. 2021-10-23 00:16:26 +00:00
gotools
include
INSTALL
intl
libada Daily bump. 2021-10-23 00:16:26 +00:00
libatomic
libbacktrace Daily bump. 2021-10-23 00:16:26 +00:00
libcc1
libcody Daily bump. 2021-11-02 00:16:32 +00:00
libcpp Daily bump. 2021-11-02 00:16:32 +00:00
libdecnumber Daily bump. 2021-10-23 00:16:26 +00:00
libffi libffi: Add --enable-cet to configure 2021-11-04 07:19:22 -07:00
libgcc Daily bump. 2021-10-28 00:16:39 +00:00
libgfortran Daily bump. 2021-10-19 00:16:23 +00:00
libgo
libgomp Daily bump. 2021-10-31 00:16:24 +00:00
libiberty Daily bump. 2021-10-23 00:16:26 +00:00
libitm
libobjc
liboffloadmic Daily bump. 2021-10-20 00:16:43 +00:00
libphobos Daily bump. 2021-11-01 00:16:20 +00:00
libquadmath
libsanitizer libsanitizer: update LOCAL_PATCHES 2021-11-04 13:26:58 +01:00
libssp
libstdc++-v3 libstdc++: Refactor emplace-like functions in std::variant 2021-11-04 09:36:10 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-11-04 00:16:32 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets 2021-10-28 10:42:49 -04:00
configure.ac [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets 2021-10-28 10:42:49 -04:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Clarify the policy WRT the Write After Approval list 2021-11-03 17:05:48 +00:00
Makefile.def Add install-dvi Makefile targets. 2021-10-22 15:43:50 -07:00
Makefile.in [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets 2021-10-28 10:42:49 -04:00
Makefile.tpl [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets 2021-10-28 10:42:49 -04: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.