This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/27755] PRE confused by control flow
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2006 14:35:07 -0000
- Subject: [Bug tree-optimization/27755] PRE confused by control flow
- References: <bug-27755-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-05-24 14:35 -------
The CFG looks like
int foo(int, int) (k, b)
{
int pretmp.21;
int n;
int res;
int j;
# BLOCK 2 freq:367
# PRED: ENTRY [100.0%] (fallthru,exec)
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 3 freq:3333
# PRED: 2 [100.0%] (fallthru,exec) 8 [100.0%] (fallthru)
# j_1 = PHI <0(2), j_7(8)>;
<L0>:;
# SUCC: 4 [100.0%] (fallthru,exec)
# BLOCK 4 freq:10000
# PRED: 7 [100.0%] (fallthru) 3 [100.0%] (fallthru,exec)
# n_13 = PHI <n_12(7), 0(3)>;
<L1>:;
n_12 = n_13 + 1;
if (n_12 <= 2) goto <L10>; else goto <L3>;
# SUCC: 7 [66.7%] (dfs_back,true,exec) 5 [33.3%] (loop_exit,false,exec)
# BLOCK 7 freq:6667
# PRED: 4 [66.7%] (dfs_back,true,exec)
<L10>:;
goto <bb 4> (<L1>);
# SUCC: 4 [100.0%] (fallthru)
# BLOCK 5 freq:3333
# PRED: 4 [33.3%] (loop_exit,false,exec)
<L3>:;
res_6 = b_5 + 1;
j_7 = j_1 + 1;
if (j_7 < k_8) goto <L11>; else goto <L4>;
# SUCC: 8 [89.0%] (dfs_back,true,exec) 6 [11.0%] (loop_exit,false,exec)
# BLOCK 8 freq:2966
# PRED: 5 [89.0%] (dfs_back,true,exec)
<L11>:;
goto <bb 3> (<L0>);
# SUCC: 3 [100.0%] (fallthru)
# BLOCK 6 freq:367
# PRED: 5 [11.0%] (loop_exit,false,exec)
<L4>:;
return res_6;
# SUCC: EXIT [100.0%]
}
where block #7 is the problematic one because ANTIC_IN of it never get's
the value handle for b+1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27755