re PR rtl-optimization/57422 (ICE: SIGSEGV in dominated_by_p with custom flags)
authorAndrey Belevantsev <abel@ispras.ru>
Mon, 23 Dec 2013 06:43:49 +0000 (10:43 +0400)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Mon, 23 Dec 2013 06:43:49 +0000 (10:43 +0400)
        PR rtl-optimization/57422
        * sel-sched.c (fill_vec_av_set): Assert that the fence insn
        can always be scheduled in its current form.

From-SVN: r206174

gcc/ChangeLog
gcc/sel-sched.c

index dd3232d..1e502d1 100644 (file)
@@ -1,6 +1,12 @@
 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.
 
index 5a94fda..29a5f1f 100644 (file)
@@ -3801,6 +3801,7 @@ fill_vec_av_set (av_set_t av, blist_t bnds, fence_t fence,
       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))
@@ -3855,9 +3856,16 @@ fill_vec_av_set (av_set_t av, blist_t bnds, fence_t 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,