-
- Downloads
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>
Loading
Please register or sign in to comment