https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102681
--- Comment #20 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #16) > (In reply to Andrew Pinski from comment #15) > > We totally missed the jump threading of 3->5->7 path and the 4->5->8 path. > > FAIL: path through PHI in bb8 (incoming bb:6) crosses loop > > But but, it does not exactly cross the loop as 5 (6) is not part of the loop > but rather just 8. I looked at the IL, and this still counts as crossing loop boundaries. Your going from no loop to loop 1. No cigar :-(. Actually, even if you remove the hunk I mentioned the shared registry restrictions will disallow it. That being said, I should clean that up.