Reduced from PR 24568:
the followin three fucntions should be equivalent:
int f(int i)
{
  if (i == 0) return 0;
  return i/10;
}
int f1(int i)
{
  return i?i/10:0;
}
int f2(int i)
{
  return i/10;
}


-- 
           Summary: a!=0?0:a/10 is not reduced to a/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=24574

Reply via email to