From: Maciej W. Rozycki Date: Sat, 5 Dec 2020 18:26:24 +0000 (+0000) Subject: cfgrtl: Add missing call to `onlyjump_p' X-Git-Tag: basepoints/gcc-12~2486 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64880a7c49e2f60d1ccabf6798f5b0ea8234edc1;p=thirdparty%2Fgcc.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 5e909e25882f..4d0249513132 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;