loop-doloop: Add missing call to `onlyjump_p'

Keep any jump that has side effects as those must not be removed.

	gcc/
	* loop-doloop.c (add_test): Only remove the jump if `onlyjump_p'.
This commit is contained in:
Maciej W. Rozycki 2020-12-05 18:26:25 +00:00
parent 64880a7c49
commit 4b70b2e07a

View File

@ -378,7 +378,7 @@ add_test (rtx cond, edge *e, basic_block dest)
bb = split_edge_and_insert (*e, seq);
*e = single_succ_edge (bb);
if (any_uncondjump_p (jump))
if (any_uncondjump_p (jump) && onlyjump_p (jump))
{
/* The condition is always true. */
delete_insn (jump);