Another reduced testcase from PR 24568:
Note this is only valid for overflow is undefined or for
unsafe_math_transformations.
nt f(int i)
{
  return -((-i)/10);
}
int f2(int i)
{
  return i/10;
}


-- 
           Summary: -(-i / 10) is not foldded to i/10
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24575

Reply via email to