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 rtl-optimization/17625] [4.0 Regression] ICE on legal (doloop creates shared RTL)


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-09-23 10:39 -------
The fix should be basically OK, except that it would be a bit safer to
unshare the count earlier; I am testing this patch.

Index: loop-doloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-doloop.c,v
retrieving revision 2.7
diff -c -3 -p -r2.7 loop-doloop.c
*** loop-doloop.c       10 Sep 2004 11:02:24 -0000      2.7
--- loop-doloop.c       23 Sep 2004 10:37:00 -0000
*************** doloop_modify (struct loop *loop, struct
*** 292,298 ****
    if (GET_CODE (counter_reg) == PLUS)
      counter_reg = XEXP (counter_reg, 0);

!   count = desc->niter_expr;
    increment_count = false;
    switch (GET_CODE (condition))
      {
--- 292,298 ----
    if (GET_CODE (counter_reg) == PLUS)
      counter_reg = XEXP (counter_reg, 0);

!   count = copy_rtx (desc->niter_expr);
    increment_count = false;
    switch (GET_CODE (condition))
      {
*************** doloop_modify (struct loop *loop, struct
*** 345,351 ****

    if (desc->noloop_assumptions)
      {
!       rtx ass = desc->noloop_assumptions;
        basic_block preheader = loop_preheader_edge (loop)->src;
        basic_block set_zero
              = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);
--- 345,351 ----

    if (desc->noloop_assumptions)
      {
!       rtx ass = copy_rtx (desc->noloop_assumptions);
        basic_block preheader = loop_preheader_edge (loop)->src;
        basic_block set_zero
              = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);


-- 


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


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