diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:24 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2020-12-05 18:26:24 +0000 |
commit | 64880a7c49e2f60d1ccabf6798f5b0ea8234edc1 (patch) | |
tree | 466f5387b828478355cf3a7eaf30f0d5bd67efc8 /gcc | |
parent | 4ec78ef4837eab9b7ce3f20d7f7b39c8a2f1e41c (diff) | |
download | gcc-64880a7c49e2f60d1ccabf6798f5b0ea8234edc1.zip gcc-64880a7c49e2f60d1ccabf6798f5b0ea8234edc1.tar.gz gcc-64880a7c49e2f60d1ccabf6798f5b0ea8234edc1.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cfgrtl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 5e909e2..4d02495 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; |