https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116053
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #6)
> [apinski@xeond2 gcc]$ git diff
> diff --git a/gcc/regcprop.cc b/gcc/regcprop.cc
> index cc0a877a85d..e884cb5a966 100644
> --- a/gcc/regcprop.cc
> +++ b/gcc/regcprop.cc
> @@ -862,7 +862,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct
> value_data *vd)
> && !side_effects_p (SET_DEST (set)))
> {
> bool last = insn == BB_END (bb);
> - delete_insn (insn);
> + delete_insn_and_edges (insn);
> if (last)
> break;
> continue;
>
>
> Now to figure out if why delete_insn_and_edges is there in the first place.
> But looks correct.
So delete_insn_and_edges was added in 2002 to handle this specific case. But
this pass was never updated because it was not seen until now.