cfgrtl: Add missing call to `onlyjump_p'

If any unconditional jumps within a block have side effects then the
block cannot be considered empty.

	gcc/
	* cfgrtl.c (rtl_block_empty_p): Return false if `!onlyjump_p'
	too.
This commit is contained in:
Maciej W. Rozycki 2020-12-05 18:26:24 +00:00
parent 4ec78ef483
commit 64880a7c49

View File

@ -4862,7 +4862,8 @@ rtl_block_empty_p (basic_block bb)
return true;
FOR_BB_INSNS (bb, insn)
if (NONDEBUG_INSN_P (insn) && !any_uncondjump_p (insn))
if (NONDEBUG_INSN_P (insn)
&& (!any_uncondjump_p (insn) || !onlyjump_p (insn)))
return false;
return true;