http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58387
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> --- I know what's happening here. It's obscure and quite nasty. We have a jump threading opportunity which requires threading through a joiner block. The jump thread leaving one edge of the joiner eventually reaches the same block as the joiner's other outgoing edge. This is all fine and good as the threading code knows the conditions under which it's still safe to thread that jump. Specifically it has to look at the PHI arguments for the two key edges and verify for each PHI that the values associated with the two key edges are the same. This condition is in place to make the SSA graph updates easier to deal with. At the time we discover and register the jump thread the condition holds and we're good to go. However a short time later we discover that we can propagate a constant to one of those PHI arguments and do so. Now the condition we needed for updating the SSA graph was broken. We update the SSA graph incorrectly. I'm going to have to review the SSA graph updating code a bit tomorrow AM. In the mean time I'm going to revert the patch.