This is the mail archive of the
mailing list for the GCC project.
r242444 - in /trunk/gcc: ChangeLog combine.c cs...
- From: rsandifo at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Tue, 15 Nov 2016 18:13:56 -0000
- Subject: r242444 - in /trunk/gcc: ChangeLog combine.c cs...
Date: Tue Nov 15 18:13:56 2016
New Revision: 242444
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
2016-11-15 Richard Sandiford <email@example.com>
Alan Hayward <firstname.lastname@example.org>
David Sherwood <email@example.com>
* rtl.h (load_extend_op): Declare.
* rtlanal.c (load_extend_op): New function.
(nonzero_bits1): Use it.
* cse.c (cse_insn): Likewise.
* fold-const.c (fold_single_bit_test): Likewise.
* fwprop.c (free_load_extend): Likewise.
* postreload.c (reload_cse_simplify_set): Likewise.
* combine.c (try_combine): Likewise.
(simplify_set): Likewise. Remove redundant SUBREG_BYTE and