Do not add a block to the outlining region if doing so would mean that
a PHI outside of the region would have incompatible incoming values from
the code replacer block.
Test case by Jun Bum Lim!
Fixes llvm.org/PR39564, rdar://45718012.
Depends on https://reviews.llvm.org/D53887.
Can we outline this function to have better readability?