public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45032] New: Missed optimization in ifcvt/crossjump
@ 2010-07-22 18:52 rth at gcc dot gnu dot org
2010-07-22 20:58 ` [Bug tree-optimization/45032] " steven at gcc dot gnu dot org
2010-07-22 21:05 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: rth at gcc dot gnu dot org @ 2010-07-22 18:52 UTC (permalink / raw)
To: gcc-bugs
int f(int x, int y);
int g(int x, int z)
{
int r;
if (z == 0)
r = f(x, 1);
else
r = f(x, 0);
return r + 1;
}
could be optimized to
r = f(x, (z == 0 ? 1 : 0));
which would reduce the size of the generated code, and for
most targets allow further simplifications on the COND_EXPR
leading to branchless assembly.
--
Summary: Missed optimization in ifcvt/crossjump
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45032
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-22 21:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 18:52 [Bug tree-optimization/45032] New: Missed optimization in ifcvt/crossjump rth at gcc dot gnu dot org
2010-07-22 20:58 ` [Bug tree-optimization/45032] " steven at gcc dot gnu dot org
2010-07-22 21:05 ` pinskia at gcc dot gnu dot 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).