This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32729] Regression: Loop unrolling not performed with large constant loop bound
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2007 20:56:17 -0000
- Subject: [Bug middle-end/32729] Regression: Loop unrolling not performed with large constant loop bound
- References: <bug-32729-14600@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rakdver at gcc dot gnu dot org 2007-07-11 20:56 -------
The following patch fixes the problem; I am not quite sure why this check is
there.
Index: cfghooks.c
===================================================================
*** cfghooks.c (revision 126547)
--- cfghooks.c (working copy)
*************** tidy_fallthru_edges (void)
*** 838,845 ****
bool
can_duplicate_block_p (basic_block bb)
{
- edge e;
-
if (!cfg_hooks->can_duplicate_block_p)
internal_error ("%s does not support can_duplicate_block_p",
cfg_hooks->name);
--- 838,843 ----
*************** can_duplicate_block_p (basic_block bb)
*** 847,858 ****
if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR)
return false;
- /* Duplicating fallthru block to exit would require adding a jump
- and splitting the real last BB. */
- e = find_edge (bb, EXIT_BLOCK_PTR);
- if (e && (e->flags & EDGE_FALLTHRU))
- return false;
-
return cfg_hooks->can_duplicate_block_p (bb);
}
--- 845,850 ----
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32729