This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32593] Missed optimization of 'y = constant - x' operation
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Nov 2009 14:35:59 -0000
- Subject: [Bug target/32593] Missed optimization of 'y = constant - x' operation
- References: <bug-32593-10175@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from rguenth at gcc dot gnu dot org 2009-11-07 14:35 -------
On the tree level we see (after FRE):
D.1996_50 = pix_1 + 1;
D.1997_51 = 1 - stride_11(D);
D.1998_52 = (unsigned int) D.1997_51;
D.1999_53 = pix_1 + D.1998_52;
D.2000_54 = *D.1999_53;
D.2003_57 = block_2 + 2;
D.2004_58 = *D.2003_57;
D.2005_59 = (unsigned char) D.2004_58;
D.2006_60 = D.2000_54 + D.2005_59;
*D.1996_50 = D.2006_60;
etc.
which again also shows the weakness of POINTER_PLUS_EXPR and the
conversions it causes for the offset operand. IVOPTs cannot cope
with it and PRE/LIM make a mess out of the code as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32593