https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125961
Bug ID: 125961
Summary: the gsi_remove of the phi in
factor_out_conditional_operation should be
remove_phi_node
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: compare-debug-failure, memory-hog
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: pinskia at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
While working on a different patch, I found that
factor_out_conditional_operation uses gsi_remove instead of remove_phi_node.
This means we don't release the ssa name for the previous phi.
This has been a bug since r6-2159-g9844173510418b when
factor_out_conditional_conversion was added in the first place.
factor_out_conditional_load has the same issue when it was added too.