aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2025-01-29 10:51:08 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2025-01-29 10:51:34 +0100
commit3d07e7bf13d4aec794dd25b5090c139b4d78283d (patch)
treefbcf38a6e77160dd9d3a1bac67a0bc7c24c50dcf /gcc/expr.cc
parent5a48079c15fda4863b02eb253e473c57a5105528 (diff)
downloadgcc-3d07e7bf13d4aec794dd25b5090c139b4d78283d.zip
gcc-3d07e7bf13d4aec794dd25b5090c139b4d78283d.tar.gz
gcc-3d07e7bf13d4aec794dd25b5090c139b4d78283d.tar.bz2
tree-ssa-dce: Avoid creating invalid BBs with no outgoing edge (PR117892)
Zhendong Su and Michal Jireš found out that our gimple DSE pass can, under fairly specific conditions, remove a noreturn call which then leaves behind a "normal" BB with no successor edges which following passes do not expect. This patch simply tells the pass to leave such calls alone even when they otherwise appear to be dead. Interestingly, our CFG verifier does not report this. I'll put on my todo list to add a test for it in the next stage 1. gcc/ChangeLog: 2025-01-28 Martin Jambor <mjambor@suse.cz> PR tree-optimization/117892 * tree-ssa-dse.cc (dse_optimize_call): Leave control-altering noreturn calls alone. gcc/testsuite/ChangeLog: 2025-01-27 Martin Jambor <mjambor@suse.cz> PR tree-optimization/117892 * gcc.dg/tree-ssa/pr117892.c: New test. * gcc.dg/tree-ssa/pr118517.c: Likewise. co-authored-by: Michal Jireš <mjires@suse.cz>
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions