------- Comment #5 from steven at gcc dot gnu dot org 2010-07-13 10:55 -------
Test case of comment #4 still fails with r162134.
Not sure what is expected for the test case of comment #0, but I'm assuming the
point is that the store of the reduction should be sunk. That doesn't happen as
of r162134, this is what comes out of the compiler at -O3:
;; Function foo (foo)
Removing basic block 6
foo (int n, int i, int j)
{
int prephitmp.3;
int k;
int D.1988;
<bb 2>:
if (n_4(D) > 0)
goto <bb 3>;
else
goto <bb 5>;
<bb 3>:
prephitmp.3_14 = aa[i_5(D)].a;
<bb 4>:
# k_16 = PHI <k_10(4), 0(3)>
# prephitmp.3_18 = PHI <prephitmp.3_9(4), prephitmp.3_14(3)>
D.1988_8 = aa[j_7(D)].b;
prephitmp.3_9 = prephitmp.3_18 + D.1988_8;
aa[i_5(D)].a = prephitmp.3_9;
k_10 = k_16 + 1;
if (k_10 != n_4(D))
goto <bb 4>;
else
goto <bb 5>;
<bb 5>:
return;
}
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2009-04-03 12:32:48 |2010-07-13 10:55:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35360