This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24574] New: a!=0?0:a/10 is not reduced to a/10
- 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: 28 Oct 2005 18:04:59 -0000
- Subject: [Bug tree-optimization/24574] New: a!=0?0:a/10 is not reduced to a/10
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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