The following two function should be the same:
_Bool f(_Bool a)
{
  return a!=1;
}
_Bool f1(_Bool a)
{
  _Bool b = !a;
  return b;
}

Right now f1 is the most optimal.


-- 
           Summary: boolvar != 1 is not converted to !boolvar
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 18908,19987
             nThis:


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

Reply via email to