This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/19951] ICE in tree_split_edge, at tree-cfg.c:3199 with -ftree-vectorize


------- Additional Comments From dorit at il dot ibm dot com  2005-02-15 13:23 -------
I'm testing this patch (it solves this PR):

Index: tree-vectorizer.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.73
diff -c -3 -p -r2.73 tree-vectorizer.c
*** tree-vectorizer.c   12 Feb 2005 12:57:01 -0000      2.73
--- tree-vectorizer.c   15 Feb 2005 13:18:34 -0000
*************** vect_analyze_loop_form (struct loop *loo
*** 5581,5597 ****
      }

    /* Make sure we have a preheader basic block.  */
!   if (!loop->pre_header)
      {
!       rescan = true;
!       loop_split_edge_with (loop_preheader_edge (loop), NULL);
      }

    /* Make sure there exists a single-predecessor exit bb:  */
!   if (EDGE_COUNT (loop->exit_edges[0]->dest->preds) != 1)
      {
!       rescan = true;
!       loop_split_edge_with (loop->exit_edges[0], NULL);
      }

    if (rescan)
--- 5581,5617 ----
      }

    /* Make sure we have a preheader basic block.  */
!   if (!loop->pre_header || EDGE_COUNT (loop->pre_header->succs) != 1)
      {
!       edge e = loop_preheader_edge (loop);
!       if (!e->flags & EDGE_ABNORMAL)
!       {
!         loop_split_edge_with (e, NULL);
!         rescan = true;
!       }
!       else
!       {
!         if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc))
!           fprintf (vect_dump, "not vectorized: no preheader bb.");
!         return NULL;
!       }
      }

    /* Make sure there exists a single-predecessor exit bb:  */
!   if (EDGE_COUNT (loop->single_exit->dest->preds) != 1)
      {
!       edge e = loop->single_exit;
!       if (!e->flags & EDGE_ABNORMAL)
!       {
!           loop_split_edge_with (e, NULL);
!           rescan = true;
!       }
!       else
!       {
!         if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc))
!           fprintf (vect_dump, "not vectorized: exit-bb has multiple preds.");
!         return NULL;
!       }
      }

    if (rescan)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19951


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]