This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56212] New: Does not fold unsigned (b - a) + a
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Feb 2013 12:50:42 +0000
- Subject: [Bug middle-end/56212] New: Does not fold unsigned (b - a) + a
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56212
Bug #: 56212
Summary: Does not fold unsigned (b - a) + a
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
unsigned foo (unsigned a, unsigned b)
{
return (b - a) + a;
}
should be simplified to return b. Later GIMPLE reassoc and forwprop do that
job.