https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122493
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> The predcom-dse-* ones happen because I think merge 2 edges which were not
> merged before and the code in
> remove_forwarder_block/redirect_edge_and_branch didn't not update the count
> correctly; I have not looked into that just yet. I am thinking
> gimple_try_redirect_by_replacing_jump/redirect_edge_succ_nodup needs code to
> update the count .
So the answer is no we are not merging 2 edges. But rather we have:
bb2
|
v
bb16 -> bb 10 -> bb 9 -> bb6
where bb 9 and bb 6 both had a phi (vop).
In the case of bb9, it was a phi with a single element.
Before we would just do a merge bb. but now we remove the fowarder block bb9
except this was a loop before (ldist) so the count is broken.
So what I am going to do is reject bb which have a single pred who also has a
single succ as that will be handled by merge_bb which does the correct thing
for updating the count.