[Bug tree-optimization/19038] [4.0 Regression] out of ssa causing loops to have more than one BB
rakdver at atrey dot karlin dot mff dot cuni dot cz
gcc-bugzilla@gcc.gnu.org
Fri Jan 21 13:22:00 GMT 2005
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-01-21 13:22 -------
Subject: Re: [4.0 Regression] out of ssa causing loops to have more than one BB
> 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.
There's not much to avoid -- the iv is simply used outside of the loop,
and we cannot do anything about it.
> 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.
I think this is how it is immediately after ivopts (if not, it would be
a bug); but dom performs this replacement.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19038
More information about the Gcc-bugs
mailing list