This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE on ARM due to recent patch
On Fri, 2005-07-29 at 01:09, Steven Bosscher wrote:
> On Friday 29 July 2005 02:07, Josh Conner wrote:
> > I see an ICE during scheduling when trying to build for arm-none-
> > elf. I tracked the failures back to two issues in the following code
> > (from add_branch_dependences):
>
> See http://gcc.gnu.org/PR23117 and the patch therein.
>
> Gr.
> Steven
I've checked in the attached patch:
2005-07-29 Richard Earnshaw <richard.earnshaw@arm.com>
Steven Bosscher <stevenb@suse.de>
PR rtl-optimization/23117
* sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly
when head == tail. Tidy comment.
Index: sched-rgn.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.99
diff -p -r1.99 sched-rgn.c
*** sched-rgn.c 27 Jul 2005 16:28:34 -0000 1.99
--- sched-rgn.c 29 Jul 2005 09:27:51 -0000
*************** add_branch_dependences (rtx head, rtx ta
*** 1954,1962 ****
T = [addr]
C ? addr += 4
! !C ? X += 12
C ? T += 1
! C ? jump foo
On a target with a one cycle stall on a memory access the optimal
sequence would be:
--- 1954,1962 ----
T = [addr]
C ? addr += 4
! !C ? X += 12
C ? T += 1
! C ? jump foo
On a target with a one cycle stall on a memory access the optimal
sequence would be:
*************** add_branch_dependences (rtx head, rtx ta
*** 1977,1993 ****
if (!reload_completed || ! JUMP_P (tail))
return;
! insn = PREV_INSN (tail);
while (insn != head)
{
/* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really
are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI);
-
- insn = PREV_INSN (insn);
}
#endif
}
--- 1977,1993 ----
if (!reload_completed || ! JUMP_P (tail))
return;
! insn = tail;
while (insn != head)
{
+ insn = PREV_INSN (insn);
+
/* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really
are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI);
}
#endif
}