Interchanged RHS substitution and test for PHI node.