------- Comment #5 from rguenth at gcc dot gnu dot org 2009-01-27 14:34 -------
We try to insert {nop_expr,g_2.7_58} in bb 41
<bb 18>:
# g_67_22 = PHI <g_67_63(39), g_67_44(D)(24)>
# g_2.7_58 = PHI <g_2.11_10(39), g_2.7_1(24)>
# g_2_59 = PHI <g_2_48(39), g_2_43(D)(24)>
# VUSE <g_162_45(D)>
g_162.9_61 ={v} g_162;
if (g_162.9_61 != 0)
goto <bb 41>;
else
goto <bb 42>;
<bb 42>:
goto <bb 13>;
<bb 41>:
goto <bb 4>;
The original avail_out computation says
exp_gen[41] := { }
tmp_gen[41] := { }
avail_out[41] := { g_2.7_1 (0002), g_2.7_58 (0030), g_162.9_61 (0032) }
(correct)
but at the point of insertion we instead have
debug[0] := { g_2.7_1 (0002), g_162.9_61 (0032), pretmp.23_38 (0046),
prephitmp.24_23 (0044), prephitmp.29_66 (0037) }
so we replaced some value here, but with a different value-number.
This happens in
/* Note that we need to value_replace both NEW_SETS, and
AVAIL_OUT. For both the case of NEW_SETS, the value may be
represented by some non-simple expression here that we want
to replace it with. */
FOR_EACH_EXPR_ID_IN_SET (newset, i, bi)
{
pre_expr expr = expression_for_id (i);
bitmap_value_replace_in_set (NEW_SETS (block), expr);
bitmap_value_replace_in_set (AVAIL_OUT (block), expr);
}
where I see us replacing in
debug[0] := { g_2.7_1 (0002), g_2.7_58 (0030), g_162.9_61 (0032), pretmp.23_38
(0046), prephitmp.24_23 (0044), prephitmp.29_66 (0037) }
with expr prephitmp.29_66 (0037)
with the above result. The expression set for 0037 at that point is
debug[0] := { g_2.7_58 (0030), {g_2} (0037), pretmp.23_2 (0037),
prephitmp.29_66 (0037) }
where for some weird reason g_2.7_58 (0030) is in it (!?).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38926