This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52157] New: Missing FRE because of sign change
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Feb 2012 20:24:17 +0000
- Subject: [Bug tree-optimization/52157] New: Missing FRE because of sign change
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52157
Bug #: 52157
Summary: Missing FRE because of sign change
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Take:
int f(int a)
{
unsigned int t = a;
t-=100;
if (t <= 200 )
return a-100;
else
return t;
}
--- CUT ---
We should able to simplify this function just to:
int f(int a)
{
unsigned int t = a;
t-=100;
return t;
}