[Bug tree-optimization/38998] New: Missed full redundancies during PRE
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 28 10:06:00 GMT 2009
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
More information about the Gcc-bugs
mailing list