Commit 91f0f975 by Bernd Schmidt Committed by Bernd Schmidt

Fix assert caused by bad cfg manipulation in bfin.

	PR target/66620
	* config/bfin/bfin.c (hwloop_optimize): Create new bb between jump and
	loop start when inserting LSETUP.

From-SVN: r225453
parent ec1590f2
2015-07-06 Bernd Schmidt <bernds@codesourcery.com>
PR target/66620
* config/bfin/bfin.c (hwloop_optimize): Create new bb between jump and
loop start when inserting LSETUP.
2015-07-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/53383
......
......@@ -3796,8 +3796,19 @@ hwloop_optimize (hwloop_info loop)
{
gcc_assert (JUMP_P (prev));
prev = PREV_INSN (prev);
emit_insn_after (seq, prev);
}
else
{
emit_insn_after (seq, prev);
BB_END (loop->incoming_src) = prev;
basic_block new_bb = create_basic_block (seq, seq_end,
loop->head->prev_bb);
edge e = loop->incoming->last ();
gcc_assert (e->flags & EDGE_FALLTHRU);
redirect_edge_succ (e, new_bb);
make_edge (new_bb, loop->head, 0);
}
emit_insn_after (seq, prev);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment