From 8ec4d0ada31aee6ee23b4ed7f234171f6639c0dd Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Thu, 14 Jan 2010 13:40:19 +0300 Subject: re PR rtl-optimization/39453 (ICE : in init_seqno, at sel-sched.c:6433) 2010-01-14 Alexander Monakov PR rtl-optimization/39453 PR rtl-optimization/42246 * sel-sched-ir.c (considered_for_pipelining_p): Do not test for pipelining_p. (sel_add_loop_preheaders): Add preheader to last_added_blocks. * gcc.dg/pr39453.c: New. * gcc.dg/pr42246.c: New. From-SVN: r155892 --- gcc/sel-sched-ir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/sel-sched-ir.c') diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index ad1dcb212de..218c04e5bf1 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -5883,7 +5883,7 @@ considered_for_pipelining_p (struct loop *loop) latch. We can't use header here, because this header could be just removed preheader and it will give us the wrong region number. Latch can't be used because it could be in the inner loop too. */ - if (LOOP_MARKED_FOR_PIPELINING_P (loop) && pipelining_p) + if (LOOP_MARKED_FOR_PIPELINING_P (loop)) { int rgn = CONTAINING_RGN (loop->latch->index); @@ -6032,7 +6032,10 @@ sel_add_loop_preheaders (void) for (i = 0; VEC_iterate (basic_block, preheader_blocks, i, bb); i++) + { + VEC_safe_push (basic_block, heap, last_added_blocks, bb); sel_add_bb (bb); + } VEC_free (basic_block, heap, preheader_blocks); } -- cgit v1.2.1