aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/bfin
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2009-09-07 15:13:40 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2009-09-07 15:13:40 +0000
commit8ff7f8241579ba8823310c4f05e267f8a24951a2 (patch)
treef980a018af60905eeae9faae47978b3508541206 /gcc/config/bfin
parent3beb864c19b34fc0e4dcfdc12e65f4b4a3eeddce (diff)
downloadgcc-8ff7f8241579ba8823310c4f05e267f8a24951a2.zip
gcc-8ff7f8241579ba8823310c4f05e267f8a24951a2.tar.gz
gcc-8ff7f8241579ba8823310c4f05e267f8a24951a2.tar.bz2
bfin.c (bfin_optimize_loop): When creating a new basic block, ensure it has an exit edge.
gcc/ * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic block, ensure it has an exit edge. Emit a barrier after a jump. gcc/testsuite/ * gcc.c-torture/compile/20090907-1.c: New test. From-SVN: r151479
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r--gcc/config/bfin/bfin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index ebcd825..29c0032 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -4185,7 +4185,10 @@ bfin_optimize_loop (loop_info loop)
seq_end = emit_insn (copy_rtx (PATTERN (last_insn)));
}
else
- seq_end = emit_jump_insn (gen_jump (label));
+ {
+ emit_jump_insn (gen_jump (label));
+ seq_end = emit_barrier ();
+ }
}
seq = get_insns ();
@@ -4233,6 +4236,7 @@ bfin_optimize_loop (loop_info loop)
else
redirect_edge_succ (e, new_bb);
}
+ e = make_edge (new_bb, loop->head, 0);
}
delete_insn (loop->loop_end);