------- Comment #5 from rguenth at gcc dot gnu dot org 2010-03-03 11:03 -------
I'm not so sure. We start with
<bb 2>:
plaintextlen_3 = *a_2(D);
<bb 3>:
# i_13 = PHI <i_6(5), 0(2)>
D.2725_5 = *a_2(D);
DoHuffIteration (D.2725_5);
i_6 = i_13 + 1;
if (i_6 <= 9999)
goto <bb 5>;
else
goto <bb 4>;
<bb 5>:
goto <bb 3>;
<bb 4>:
D.2725_7 = *a_2(D);
so *a_2 (4) is antic-out in bb3 but dies in bb3 (thus it's not antic-in there).
*a_2 (3) is antic-in in bb5 and available in bb2. Thus we insert in bb5:
<bb 2>:
plaintextlen_3 = *a_2(D);
<bb 3>:
# i_13 = PHI <i_6(5), 0(2)>
# prephitmp.3_14 = PHI <pretmp.2_1(5), plaintextlen_3(2)>
D.2725_5 = prephitmp.3_14;
DoHuffIteration (D.2725_5);
i_6 = i_13 + 1;
if (i_6 <= 9999)
goto <bb 5>;
else
goto <bb 4>;
<bb 5>:
pretmp.2_1 = *a_2(D);
goto <bb 3>;
<bb 4>:
D.2725_7 = *a_2(D);
now what is left is hoisting *a_2(D) to after the call. But that's not PRE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497