This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/37537] New: mfcr is produced when a branch should be done


Reduced from PR 37536, but this is actually what the user did:

int f(int a, int b, int c)
{
if (a > 0 ? b < c: b > c)
  return a;
else
  return b;
}

This should be able to rewritten as:
int f(int a, int b, int c)
{
  if (a > 0)
  {
    if (b < c)
      return a;
  } else if (b > c)
      return a;

  return b;
}


-- 
           Summary: mfcr is produced when a branch should be done
           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: pinskia at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]