https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114832
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- With the early break code we now allow multiple blocks in the loop body but guess this only happens for blocks with exits. In this case we have a simple forwarder which seems to confuse the code. Usually if-conversion gets rid of those so -fno-tree-loop-if-convert is critical to trigger this. If we want to fix this on the release branch I think we should reject loops with this kind of CFG again. In stage1 we should fix the real issue. I think the fix is just diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 8d9b533d50f..43c7881c640 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -1523,7 +1523,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit, exit_dest = exit->dest; was_imm_dom = (get_immediate_dominator (CDI_DOMINATORS, - exit_dest) == loop->header ? + exit_dest) == exit->src ? true : false); /* Also copy the pre-header, this avoids jumping through hoops to