Issue exposed by noalias or more aggressive alias analysis.
I'm not particularly happy with the extra loop this patch adds, but I'm
not sure how to go about fixing it.
I'm also not very happy with the use of mayHaveSideEffects; we only care
specifically about control flow here.
Can you point to the test case which requires this part? ScalarPRE is not supposed to need to reason about availability. Where does this break?
Also, can this be rephrased in terms of the same isValueFullyAvailableInBlock helper?