2013-12-23 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/57422
+ * sel-sched.c (fill_vec_av_set): Assert that the fence insn
+ can always be scheduled in its current form.
+
+2013-12-23 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/57422
* sel-sched.c (mark_unavailable_hard_regs): Fix typo when calling
add_to_hard_reg_set.
signed char target_available;
bool is_orig_reg_p = true;
int need_cycles, new_prio;
+ bool fence_insn_p = INSN_UID (insn) == INSN_UID (FENCE_INSN (fence));
/* Don't allow any insns other than from SCHED_GROUP if we have one. */
if (FENCE_SCHED_NEXT (fence) && insn != FENCE_SCHED_NEXT (fence))
if (sched_verbose >= 4)
sel_print ("Expr %d has no suitable target register\n",
INSN_UID (insn));
- continue;
+
+ /* A fence insn should not get here. */
+ gcc_assert (!fence_insn_p);
+ continue;
}
+ /* At this point a fence insn should always be available. */
+ gcc_assert (!fence_insn_p
+ || INSN_UID (FENCE_INSN (fence)) == INSN_UID (EXPR_INSN_RTX (expr)));
+
/* Filter expressions that need to be renamed or speculated when
pipelining, because compensating register copies or speculation
checks are likely to be placed near the beginning of the loop,