Go to file
Richard Earnshaw ca7e162896 [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing with -mno-unaligned-access
Peephole patterns exist in the arm backend to spot load/store
operations to adjacent memory operations in order to convert them into
ldrd/strd instructions.  However, when we have strict alignment
enforced, then we can only do this if the accesses are known to be
64-bit aligned; this is unlikely to be the case for most loads.  The
patch adds some alignment checking to the code that validates the
addresses for use in the peephole patterns.  This should also fix
incorrect generation of ldrd/strd with unaligned accesses that could
previously have occurred on ARMv5e where all such operations must be
64-bit aligned.

I've added some new tests as well.  In doing so I discovered that the
ldrd/strd peephole tests could never fail since they would match the
source file name in the scanned assembly as well as any instructions
of the intended type.  I've fixed those by tightening the scan results
slightly.

gcc:

* config/arm/arm.c (align_ok_ldrd_strd): New function.
(mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of the
mem into it.
(gen_operands_ldrd_strd): Validate the alignment of the accesses.

testsuite:

* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
* gcc.target/arm/peep-strd-1.c: Likewise.
* gcc.target/arm/peep-ldrd-2.c: New test.
* gcc.target/arm/peep-strd-2.c: New test.

From-SVN: r253891
2017-10-19 13:14:55 +00:00
config Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
contrib Handle libbacktrace in contrib/gcc_update 2017-10-02 13:58:11 +02:00
fixincludes Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
gcc [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing with -mno-unaligned-access 2017-10-19 13:14:55 +00:00
gnattools Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
gotools Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
include Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
INSTALL
intl Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libada Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libatomic Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libbacktrace elf.c: Fix typo in the last commit, SFH_COMPRESSED vs SHF_COMPRESSED. 2017-10-10 19:58:49 +00:00
libcc1 Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libcilkrts Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libcpp Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libdecnumber Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libffi Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libgcc re PR target/82274 (__builtin_mul_overflow fails to detect overflow for int64_t when compiled with -m32) 2017-10-13 19:26:28 +02:00
libgfortran backport: re PR fortran/78387 (OpenMP segfault/stack size exceeded writing to internal file) 2017-09-20 01:32:59 +00:00
libgo re PR go/82559 (libgo bootstrap broken on at least alpha, s390x) 2017-10-15 19:45:33 +00:00
libgomp backport: re PR c++/81314 (Undefined reference to a function with -fopenmp) 2017-09-15 13:27:07 +02:00
libhsail-rt Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libiberty Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libitm Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libmpx Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libobjc Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
liboffloadmic Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libquadmath Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libsanitizer Add sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC 2017-10-05 03:45:04 -07:00
libssp Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
libstdc++-v3 Fix tests for std::clamp 2017-09-21 11:11:21 +01:00
libvtv Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
lto-plugin Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
maintainer-scripts Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
zlib Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog Update ChangeLog and version files for release 2017-08-14 07:59:11 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess * config.guess: Import latest from upstream. 2017-03-18 18:22:06 +00:00
config.rpath
config.sub
configure configure.ac: Enable LTO by default on darwin >= 9. 2017-03-22 17:51:18 +00:00
configure.ac configure.ac: Enable LTO by default on darwin >= 9. 2017-03-22 17:51:18 +00: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 Add RISC-V Maintainers 2017-03-20 16:11:32 +00:00
Makefile.def re PR bootstrap/77661 (--enable-maintainer-mode causes in-tree-build of MPC to fail) 2017-04-19 18:49:29 +00:00
Makefile.in re PR bootstrap/77661 (--enable-maintainer-mode causes in-tree-build of MPC to fail) 2017-04-19 18:49:29 +00:00
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.