Go to file
Richard Sandiford 3712c7a301 Add a load_extend_op wrapper
LOAD_EXTEND_OP only applies to scalar integer modes that are narrower
than a word.  However, callers weren't consistent about which of these
checks they made beforehand, and also weren't consistent about whether
"smaller" was based on (bit)size or precision (IMO it's the latter).
This patch adds a wrapper to try to make the macro easier to use.

LOAD_EXTEND_OP is often used to disable transformations that aren't
beneficial when extends from memory are free, so being stricter about
the check accidentally exposed more optimisation opportunities.

"SUBREG_BYTE (...) == 0" and subreg_lowpart_p are implied by
paradoxical_subreg_p, so the patch also removes some redundant tests.

The patch doesn't change reload, since different checks could have
unforeseen consequences.

gcc/
2016-11-15  Richard Sandiford  <richard.sandiford@arm.com>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (load_extend_op): Declare.
	* rtlanal.c (load_extend_op): New function.
	(nonzero_bits1): Use it.
	(num_sign_bit_copies1): Likewise.
	* cse.c (cse_insn): Likewise.
	* fold-const.c (fold_single_bit_test): Likewise.
	(fold_unary_loc): Likewise.
	* fwprop.c (free_load_extend): Likewise.
	* postreload.c (reload_cse_simplify_set): Likewise.
	(reload_cse_simplify_operands): Likewise.
	* combine.c (try_combine): Likewise.
	(simplify_set): Likewise.  Remove redundant SUBREG_BYTE and
	subreg_lowpart_p checks.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r242444
2016-11-15 18:13:56 +00:00
boehm-gc config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
config config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
contrib Add BZ marker to recent commit 2016-10-25 09:02:32 -06:00
fixincludes check.tpl: Convert line endings to unix on test outputs 2016-09-30 10:36:18 -06:00
gcc Add a load_extend_op wrapper 2016-11-15 18:13:56 +00:00
gnattools
gotools Update copyright dates 2016-06-07 08:54:22 +00:00
include Implement P0012R1, Make exception specifications part of the type system. 2016-11-07 18:09:29 -05:00
INSTALL
intl config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libada config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libatomic config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libbacktrace config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libcc1 Update copyright dates 2016-06-07 08:54:22 +00:00
libcilkrts config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libcpp [AArch64] Optimized implementation of search_line_fast for the CPP lexer 2016-11-08 13:29:32 +00:00
libdecnumber config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libffi config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libgcc [ARC] [libgcc] Fix defines 2016-11-15 16:42:17 +01:00
libgfortran config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libgo config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libgomp libgomp testsuite: add missing map clauses 2016-11-15 20:14:32 +03:00
libiberty - Revert last commit, restore the regenerated files aclocal.m4 and configure 2016-11-15 17:27:39 +00:00
libitm config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libmpx config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libobjc config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
liboffloadmic config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libquadmath config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libsanitizer config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libssp config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
libstdc++-v3 variant: Remove variant<T&>... 2016-11-15 17:26:59 +00:00
libvtv config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
lto-plugin config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
maintainer-scripts re PR web/50642 (onlinedocs formated text too small to read) 2016-09-04 19:38:05 +00:00
zlib config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: Ignore in-tree prerequisites. 2016-09-09 17:20:55 -04:00
ABOUT-NLS
ChangeLog Makefile.def: Remove references to GCJ. 2016-11-15 17:29:12 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
config.guess config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
config.rpath
config.sub config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
configure config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
configure.ac config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +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 MAINTAINERS (Write After Approval): Update email address, 2016-11-02 02:10:45 +00:00
Makefile.def Makefile.def: Remove references to GCJ. 2016-11-15 17:29:12 +00:00
Makefile.in Makefile.def: Remove references to GCJ. 2016-11-15 17:29:12 +00:00
Makefile.tpl Makefile.def: Remove references to GCJ. 2016-11-15 17:29:12 +00:00
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.