https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125672
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #10)
> I think that VN should value-number the PHIs the same btw, there's just no
> FRE pass before jump threading makes a mess of it.
Ah, no, they are not the same.
if (_134 == -1)
goto <bb 9>; [41.00%]
else
goto <bb 8>; [59.00%]
<bb 8> [local count: 563821836]:
<bb 9> [local count: 955630224]:
# iftmp.18_201 = PHI <_231(7), _252(8)>
...
if (_134 == -1)
goto <bb 17>; [41.00%]
else
goto <bb 16>; [59.00%]
<bb 16> [local count: 563821836]:
<bb 17> [local count: 955630224]:
# iftmp.22_185 = PHI <_58(15), _62(16)>
not sure where we could "move" the PHI (that's basically the association
we're after). For equal control conditions sink the earlier PHI to
the 2nd place [iff the half diamond is otherwise empty].