This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51879] New: Missed tail merging with non-const/pure calls
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jan 2012 11:11:41 +0000
- Subject: [Bug tree-optimization/51879] New: Missed tail merging with non-const/pure calls
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879
Bug #: 51879
Summary: Missed tail merging with non-const/pure calls
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
CC: vries@gcc.gnu.org
Depends on: 51877
We don't tail merge currently:
int bar (int);
void baz (int);
void
foo (int y)
{
int a;
if (y == 6)
a = bar (7);
else
a = bar (7);
baz (a);
}
(both before the PR51877 fix and after it), because both SSA_NAMEs on the lhs
of the calls aren't valueized the same by SCCVN.
Similarly for:
if (y == 6)
a = bar (7) + 6;
else
a = bar (7) + 6;
or
if (y)
baz (bar (7) + 6);
else
baz (bar (7) + 6);