changeToUnreachable may remove PHI nodes from executable blocks we found values
for and we would fail to replace them. By changing dead blocks to unreachable after
we replaced constants in all executable blocks, we ensure such PHI nodes are replaced
by their known value before.
Fixes PR37780.
The "PN.getNumIncomingValues() != 2" won't work correctly in all cases.
Instead of adding this extra loop, can you just delay the call to changeToUnreachable until after we've iterated over all the blocks?