------- Additional Comments From steven at gcc dot gnu dot org 2005-01-21 13:18 ------- No, tree-ssa-live is quite right. ivtmp.3_12 and ivtmp.3_20 are defined and live at some common statements, so they conflict: # BLOCK 1 # PRED: 0 [88.4%] (true,exec) 1 [89.0%] (dfs_back,false,exec) # ivtmp.3_12 = PHI <0(0), ivtmp.3_20(1)>; <L8>:; D.501_28 = &__BLNK__.array1[ivtmp.3_12]; # __BLNK___11 = V_MAY_DEF <__BLNK___2>; *D.501_28 = 1.0e+0; ivtmp.3_20 = ivtmp.3_12 + 1; D.503_30 = D.457_4 - 1; D.504_31 = (<unnamed type>) D.503_30; D.505_32 = D.504_31 + 1; if (ivtmp.3_20 == D.505_32) goto <L12>; else goto <L8>; # SUCC: 2 [11.0%] (loop_exit,true,exec) 1 [89.0%] (dfs_back,false,exec) # BLOCK 2 # PRED: 1 [11.0%] (loop_exit,true,exec) <L12>:; D.497_22 = ivtmp.3_12 + 2; lsm_tmp.2_23 = (int4) D.497_22; # j_7 = V_MUST_DEF <j_6>; j = lsm_tmp.2_23; # SUCC: 3 [100.0%] (fallthru) Between "ivtmp.3_20 = ivtmp.3_12 + 1;" and "D.497_22 = ivtmp.3_12 + 2;" both versions of ivtmp.3 are live. I have not looked at what causes this, but IMOH all passes should avoid letting induction variables escape a loop. Interesting note: I think "D.497_22 = ivtmp.3_12 + 2;" could be replaced with "D.497_22 = ivtmp.3_20 + 1;" which would fix this problem.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19038