https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102631
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
For the calls-aarch64.ii testcase, there's some additional information in the
upstream thread. Quoted here for convenience:
There's some missing context.
The only way to get to BB101->BB102 is through:
<bb 100>
if (_6711 != 0)
goto <bb 101>; [5.50%]
else
goto <bb 293>; [94.50%]
And there's an implicit relation between _6711 and _811:
<bb 86>
...
if (_6711 != 0)
goto <bb 287>; [5.50%]
else
goto <bb 87>; [94.50%]
<bb 287> [local count: 17344687]:
goto <bb 88>; [100.00%]
<bb 87> [local count: 298013267]:
<bb 88> [local count: 315357954]:
# _881 = PHI <1(87), 0(287)>
That is, _6711 == !_881.
Presumably the threader shuffled things sufficiently so that the above
relationship is difficult to devise. It seemsthat it's having a hard time
noticing that the _6711 and _811 guards are inversely related.