This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38998] New: Missed full redundancies during PRE
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2009 10:06:24 -0000
- Subject: [Bug tree-optimization/38998] New: Missed full redundancies during PRE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
extern double cos(double);
void test2(double x, double y)
{
if (cos(y<10 ? x : -y) != cos(y<10 ? x : y))
link_error ();
}
PRE figures out new full redundancies because it phi-translates. This leads
to missed optimizations wrt the SCCVN value-numbers because we do not iterate
with the new redundancy. The immediate effect is that PRE inserts a
duplicate PHI:
<bb 4>:
# x_2 = PHI <x_5(D)(3), y_3(D)(7)>
# D.1601_16 = PHI <D.1601_8(3), D.1601_9(7)>
# prephitmp.13_15 = PHI <D.1601_8(3), D.1601_9(7)>
which only DOM removes later. The second-order missed optimization is
that elimination does not optimize the following predicate
D.1606_12 = prephitmp.13_15;
if (D.1601_16 != D.1606_12)
See also
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01545.html
which added a broken patch that caused PR38926.
--
Summary: Missed full redundancies during PRE
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38998