summaryrefslogtreecommitdiff
path: root/gcc/loop-doloop.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-22 00:12:52 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-22 00:12:52 +0000
commitd6a1bbdbd61ac049c07a602e77640b208f90605c (patch)
treec758a5e110c013484ee186033b5a0b2cbd95d424 /gcc/loop-doloop.c
parent994f2db2bcbc59e819ffd0641a5133c465932b64 (diff)
downloadgcc-d6a1bbdbd61ac049c07a602e77640b208f90605c.tar.gz
PR rtl-optimization/29924
* loop-unroll.c (split_edge_and_insert): Handle the case insns is NULL. (unroll_loop_runtime_iterations): Assert that the argument passed to split_edge_and_insert is not NULL. * loop-doloop.c (add_test): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r--gcc/loop-doloop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index afe65cb7d28..004dcfe72f8 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -248,7 +248,7 @@ add_test (rtx cond, edge *e, basic_block dest)
do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL_RTX, label);
jump = get_last_insn ();
- if (!JUMP_P (jump))
+ if (!jump || !JUMP_P (jump))
{
/* The condition is always false and the jump was optimized out. */
end_sequence ();
@@ -257,6 +257,10 @@ add_test (rtx cond, edge *e, basic_block dest)
seq = get_insns ();
end_sequence ();
+
+ /* There always is at least the jump insn in the sequence. */
+ gcc_assert (seq != NULL_RTX);
+
bb = split_edge_and_insert (*e, seq);
*e = single_succ_edge (bb);