This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37537] New: mfcr is produced when a branch should be done
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2008 01:43:56 -0000
- Subject: [Bug tree-optimization/37537] New: mfcr is produced when a branch should be done
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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