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

Reply via email to