Hello,
This patch fixes the ICE on assert recently introduced by me and by itself
is a continuation of PR 57422. When resetting the target availability bit,
we do not always recompute it as this means renaming support and it is
expensive. Thus, we cannot rely on the recomputation to check that the
fence insn will always get the bit right. So the patch avoids resetting
the bit for the fence insn.
Bootstrapped and tested on x86-64 with selective scheduling enabled and on
ia64, Dominique has kindly tested on darwin.
Committed after offline discussion with Alexander.
Andrey
Index: gcc/ChangeLog
===================================================================
*** gcc/ChangeLog (revision 208108)
--- gcc/ChangeLog (revision 208109)
***************
*** 1,3 ****
--- 1,9 ----
+ 2014-02-25 Andrey Belevantsev <a...@ispras.ru>
+
+ PR rtl-optimization/60292
+ * sel-sched.c (fill_vec_av_set): Do not reset target availability
+ bit fot the fence instruction.
+
2014-02-24 Alangi Derick <alangider...@gmail.com>
* calls.h: Fix typo in comment.
Index: gcc/sel-sched.c
===================================================================
*** gcc/sel-sched.c (revision 208108)
--- gcc/sel-sched.c (revision 208109)
*************** fill_vec_av_set (av_set_t av, blist_t bn
*** 3823,3829 ****
/* If insn was already scheduled on the current fence,
set TARGET_AVAILABLE to -1 no matter what expr's attribute says. */
! if (vinsn_vec_has_expr_p (vec_target_unavailable_vinsns, expr))
target_available = -1;
/* If the availability of the EXPR is invalidated by the insertion of
--- 3823,3830 ----
/* If insn was already scheduled on the current fence,
set TARGET_AVAILABLE to -1 no matter what expr's attribute says. */
! if (vinsn_vec_has_expr_p (vec_target_unavailable_vinsns, expr)
! && !fence_insn_p)
target_available = -1;
/* If the availability of the EXPR is invalidated by the insertion of