summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <mkuvyrkov@ispras.ru>2006-11-16 15:10:57 +0000
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>2006-11-16 15:10:57 +0000
commit44683f7b94d399fd94f2e1acf80aea288e6fedbd (patch)
treec9bb0fa02129c883f86bb5f31a90b439fb8074b6 /gcc/haifa-sched.c
parent910dfa322e447367f69fbd5687521a2d7d901d48 (diff)
downloadgcc-44683f7b94d399fd94f2e1acf80aea288e6fedbd.tar.gz
re PR target/29201 (ICE in create_recovery_block, at haifa-sched.c:3692 at -O3)
2006-11-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> PR target/29201 * cfgrtl.c (rtl_delete_block): Move the code for getting last insn of bb to ... (get_last_bb_insn): ... new global function. (basic_block.h): Declare it. * haifa-sched.c (create_recovery_block): Use it. 2006-11-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> PR target/29201 * gcc.c-torture/compile/pr29201.c: New test for ia64 target. From-SVN: r118893
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index ebe7f24ebb5..70416871a63 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -3679,18 +3679,22 @@ static basic_block
create_recovery_block (void)
{
rtx label;
+ rtx barrier;
basic_block rec;
added_recovery_block_p = true;
if (!before_recovery)
init_before_recovery ();
-
- label = gen_label_rtx ();
- gcc_assert (BARRIER_P (NEXT_INSN (BB_END (before_recovery))));
- label = emit_label_after (label, NEXT_INSN (BB_END (before_recovery)));
- rec = create_basic_block (label, label, before_recovery);
+ barrier = get_last_bb_insn (before_recovery);
+ gcc_assert (BARRIER_P (barrier));
+
+ label = emit_label_after (gen_label_rtx (), barrier);
+
+ rec = create_basic_block (label, label, before_recovery);
+
+ /* Recovery block always end with an unconditional jump. */
emit_barrier_after (BB_END (rec));
if (BB_PARTITION (before_recovery) != BB_UNPARTITIONED)