This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r242445 - in /trunk/gcc: ChangeLog alias.c


Author: rsandifo
Date: Tue Nov 15 18:16:59 2016
New Revision: 242445

URL: https://gcc.gnu.org/viewcvs?rev=242445&root=gcc&view=rev
Log:
Use simplify_gen_binary in canon_rtx

After simplifying the operands of a PLUS, canon_rtx checked only
for cases in which one of the simplified operands was a constant,
falling back to gen_rtx_PLUS otherwise.  This left the PLUS in a
non-canonical order if one of the simplified operands was
(plus (reg R1) (const_int X)); we'd end up with:

       (plus (plus (reg R1) (const_int Y)) (reg R2))

rather than:

       (plus (plus (reg R1) (reg R2)) (const_int Y))

Fixing this exposed new DSE opportunities on spu-elf in
gcc.c-torture/execute/builtins/strcat-chk.c but otherwise
it doesn't seem to have much practical effect.

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

	* alias.c (canon_rtx): Use simplify_gen_binary.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/alias.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]