------- Comment #32 from rguenth at gcc dot gnu dot org 2007-10-24 15:02 ------- I have a patch to "fix" the heuristics, but it doesn't have effect as nobody hoists PHI nodes that have become invariant apperantly. After PRE I see
<bb 100>: # HEAP.202_828 = PHI <HEAP.202_747(150), HEAP.202_743(148)> <bb 101>: # SMT.222_639 = PHI <SMT.222_638(100), SMT.222_599(152)> # dtvol_656 = PHI <dtvol_620(100), dtvol_655(152)> # MPT.242_668 = PHI <MPT.242_744(100), MPT.242_668(152)> # l_1 = PHI <1(100), l_428(152)> # VUSE <MPT.242_668> D.1241_376 = du.data; ... (more VUSEs of MPT.242_668, the only VDEFs in the loop follow) # dtvol_655 = VDEF <dtvol_656> # SMT.222_599 = VDEF <SMT.222_639> (*D.1242_377)[D.1259_397] = D.1277_426; l_428 = l_1 + 1; if (l_1 == 5) goto <bb 102>; else goto <bb 152>; <bb 152>: goto <bb 101>; <bb 102>: the # SMT.222_639 = PHI <SMT.222_638(100), SMT.222_599(152)> could be hoisted to BB100 (even to BB92). Who is supposed to do this? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32921