Go to file
Richard Sandiford 5a783f42d7 aarch64: Add a minipass for fusing CC insns [PR88836]
This patch adds a small target-specific pass to remove redundant SVE
PTEST instructions.  There are two important uses of this:

- Removing PTESTs after WHILELOs (PR88836).  The original testcase
  no longer exhibits the problem due to more recent optimisations,
  but it can still be seen in simple cases like the one in the patch.
  It also shows up in 450.soplex.

- Removing PTESTs after RDFFRs in ACLE code.

This is just an interim “solution” for GCC 11.  I hope to replace
it with something generic and target-independent for GCC 12.
However, the use cases above are very important for performance,
so I'd rather not leave the bug unfixed for yet another release cycle.

Since the pass is intended to be short-lived, I've not added
a command-line option for it.  The pass can be disabled using
-fdisable-rtl-cc_fusion if necessary.

Although what the pass does is independent of SVE, it's motivated
only by SVE cases and doesn't trigger for any non-SVE test I've seen.
I've therefore gated it on TARGET_SVE and restricted it to PTEST
patterns.

gcc/
	PR target/88836
	* config.gcc (aarch64*-*-*): Add aarch64-cc-fusion.o to extra_objs.
	* Makefile.in (RTL_SSA_H): New variable.
	* config/aarch64/t-aarch64 (aarch64-cc-fusion.o): New rule.
	* config/aarch64/aarch64-protos.h (make_pass_cc_fusion): Declare.
	* config/aarch64/aarch64-passes.def: Add pass_cc_fusion after
	pass_combine.
	* config/aarch64/aarch64-cc-fusion.cc: New file.

gcc/testsuite/
	PR target/88836
	* gcc.target/aarch64/sve/acle/general/ldff1_8.c: New test.
	* gcc.target/aarch64/sve/ptest_1.c: Likewise.
2021-01-15 16:45:42 +00:00
c++tools
config
contrib Daily bump. 2021-01-15 00:16:28 +00:00
fixincludes
gcc aarch64: Add a minipass for fusing CC insns [PR88836] 2021-01-15 16:45:42 +00:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic libatomic, libgomp, libitc: Fix bootstrap [PR70454] 2021-01-15 13:16:42 +01:00
libbacktrace
libcc1
libcody Daily bump. 2021-01-13 00:16:36 +00:00
libcpp
libdecnumber
libffi
libgcc Daily bump. 2021-01-14 00:16:24 +00:00
libgfortran
libgo libgo: update hurd support 2021-01-14 09:57:04 -08:00
libgomp libatomic, libgomp, libitc: Fix bootstrap [PR70454] 2021-01-15 13:16:42 +01:00
libhsail-rt
libiberty
libitm libatomic, libgomp, libitc: Fix bootstrap [PR70454] 2021-01-15 13:16:42 +01:00
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 Daily bump. 2021-01-15 00:16:28 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-01-13 00:16:36 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
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: Fix spacing 2021-01-12 18:41:43 +00:00
Makefile.def
Makefile.in
Makefile.tpl
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.