int foo (int i, int j)
{
  if (i >= j)
    if (i != j)
      return 0;
  return -1;
}

should be optimized to

  if (i > j)
    return 0;
  return -1;


-- 
           Summary: if-combine doesn't optimize != after >= test
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 36861
             nThis:


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

Reply via email to