public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/56212] New: Does not fold unsigned (b - a) + a
@ 2013-02-05 12:50 rguenth at gcc dot gnu.org
2014-12-11 14:22 ` [Bug middle-end/56212] " mpolacek at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-05 12:50 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/56212] Does not fold unsigned (b - a) + a
2013-02-05 12:50 [Bug middle-end/56212] New: Does not fold unsigned (b - a) + a rguenth at gcc dot gnu.org
@ 2014-12-11 14:22 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-11 14:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56212
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Trunk optimizes it to return b now, so I guess fixed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-11 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 12:50 [Bug middle-end/56212] New: Does not fold unsigned (b - a) + a rguenth at gcc dot gnu.org
2014-12-11 14:22 ` [Bug middle-end/56212] " mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).