Commit abf86bf2 by Richard Earnshaw Committed by Richard Earnshaw

re PR rtl-optimization/23117 (ICE on valid code while building libgcc)

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.

Co-Authored-By: Steven Bosscher <stevenb@suse.de>

From-SVN: r102551
parent 37cf6116
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.
2005-07-28 Richard Henderson <rth@redhat.com> 2005-07-28 Richard Henderson <rth@redhat.com>
* cse.c (exp_equiv_p): Special case CONST_DOUBLE. * cse.c (exp_equiv_p): Special case CONST_DOUBLE.
......
...@@ -1954,9 +1954,9 @@ add_branch_dependences (rtx head, rtx tail) ...@@ -1954,9 +1954,9 @@ add_branch_dependences (rtx head, rtx tail)
T = [addr] T = [addr]
C ? addr += 4 C ? addr += 4
!C ? X += 12 !C ? X += 12
C ? T += 1 C ? T += 1
C ? jump foo C ? jump foo
On a target with a one cycle stall on a memory access the optimal On a target with a one cycle stall on a memory access the optimal
sequence would be: sequence would be:
...@@ -1977,17 +1977,17 @@ add_branch_dependences (rtx head, rtx tail) ...@@ -1977,17 +1977,17 @@ add_branch_dependences (rtx head, rtx tail)
if (!reload_completed || ! JUMP_P (tail)) if (!reload_completed || ! JUMP_P (tail))
return; return;
insn = PREV_INSN (tail); insn = tail;
while (insn != head) while (insn != head)
{ {
insn = PREV_INSN (insn);
/* Note that we want to add this dependency even when /* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really is that we _want_ this dependency, even if these insns really
are independent. */ are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC) if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI); add_dependence (tail, insn, REG_DEP_ANTI);
insn = PREV_INSN (insn);
} }
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment