This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23294] New: fold does not fold a*2-a to a
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2005 03:06:50 -0000
- Subject: [Bug middle-end/23294] New: fold does not fold a*2-a to a
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I noticed this while running a profiledbootstrap and looking through simplify-rtx.c.
Take the following function:
int f(int a)
{
return a*2-a;
}
We don't optimizate a*2-a to just a on the tree level but do in combine, we do.
--
Summary: fold does not fold a*2-a to a
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 19986
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23294