https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116485
Bug ID: 116485 Summary: CFG cleanup should prune unreachable switch cases Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- At the moment forwprop does pruning of case labels in simplify_gimple_switch_label_vec and manually removes corresponding edges in the process, requiring dominators to be released. This (the edge pruning) should instead be done by CFG cleanup much like it handles CFG adjustments after passes replacing if conditions with true/false.