Go to file
Kyrylo Tkachov c8574943c1 [AArch64] PR target/84748: Mark *compare_cstore<mode>_insn as clobbering CC reg
In this wrong-code PR the combine pass ends up moving a CC-using instruction past a *compare_cstore<mode>_insn
insn_and_split. After reload the *compare_cstore<mode>_insn splitter ends up generating a SUBS instruction that
clobbers the condition flags, and things go bad.

The solution is simple, the *compare_cstore<mode>_insn pattern should specify that it clobbers the CC register
so that combine (or any other pass) does not assume that it can move CC-using patterns across it.

This patch does that and fixes the testcase.

The testcase FAILs on GCC 8 only, but the buggy pattern is in GCC 6 onwards, so we should backport this as
a latent bug fix after it's had some time to bake in trunk.

Bootstrapped and tested on aarch64-none-linux-gnu.

	PR target/84748
	* config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
	as clobbering CC_REGNUM.

	* gcc.c-torture/execute/pr84748.c: New test.

From-SVN: r258366
2018-03-08 15:50:25 +00:00
config
contrib More Cilk Plus removal 2018-03-02 17:35:26 +01:00
fixincludes
gcc [AArch64] PR target/84748: Mark *compare_cstore<mode>_insn as clobbering CC reg 2018-03-08 15:50:25 +00:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcpp * da.po: Update. 2018-03-03 18:55:20 +00:00
libdecnumber
libffi
libgcc fptr.c (_dl_read_access_allowed): New. 2018-03-07 00:17:32 +00:00
libgfortran
libgo runtime: push arena on AIX higher due to clashes 2018-03-07 15:22:46 +00:00
libgomp
libhsail-rt
libiberty libiberty: fix URL for demangler ABI 2018-03-02 20:20:37 +00:00
libitm
libmpx
libobjc
liboffloadmic
libquadmath
libsanitizer
libssp
libstdc++-v3 printers.py (NodeIteratorPrinter): New. 2018-03-08 06:26:15 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog
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
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.