This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/69740] [5/6 Regression] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure"
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Feb 2016 08:12:35 +0000
- Subject: [Bug tree-optimization/69740] [5/6 Regression] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure"
- Auto-submitted: auto-generated
- References: <bug-69740-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69740
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, in *.mergephi1 we have:
<bb 2>:
b.0_4 = b;
if (b.0_4 != 0)
goto <bb 5>;
else
goto <bb 3>;
<bb 3>:
c[0] = 0;
l1:
c ={v} {CLOBBER};
<bb 5>:
a.1_7 = a;
if (a.1_7 != 0)
goto <bb 4> (l1);
else
goto <bb 6>;
Then DSE1 removes the c[0] = 0;, but the loop still has multiple entries at
that point. Then in cddce the
if (b.0_4 != 0)
statement is removed as unnecessary and remove_dead_stmt has:
/* If we made a BB unconditionally exit a loop or removed
an entry into an irreducible region, then this transform
alters the set of BBs in the loop. Schedule a fixup. */
if (loop_exit_edge_p (bb->loop_father, e)
|| (e2->dest->flags & BB_IRREDUCIBLE_LOOP))
loops_state_set (LOOPS_NEED_FIXUP);
remove_edge (e2);
but e2->dest->flags doesn't have BB_IRREDUCIBLE_LOOP set and e is not exit edge
of the only loop in the loop structure (loop 0).
So, should there be an irreducible loop before cddce? Or should DCE mark loops
for fixup even in this case? Richard, can you please have a look?