From: Maciej W. Rozycki Date: Sat, 5 Dec 2020 18:26:24 +0000 (+0000) Subject: cfgrtl: Add missing call to `onlyjump_p' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64880a7c49e2f60d1ccabf6798f5b0ea8234edc1;p=gcc.git 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. --- diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 5e909e25882..4d024951313 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -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;