nir/opt_if: Fix opt_if_simplification when else branch has jump

Danylo Piliaiev requested to merge GL/mesa:fix/3282-opt_if_simplification into master

Consider the following case:

 if ssa_1 {
    block block_2:
    /* succs: block_4 */
 } else {
    block block_3:
    /* succs: block_5 */

 block block_4:
 vec1 32 ssa_100 = phi block_2: ssa_2

After block_3 extraction and reinsertion, phi->pred becomes invalid and isn't updated by reinsertionsince it is unreachable from block_3.

Closes: #3282 (closed)
Fixes: e3e929f8

Intel CI: - there are couple of failures due to already fixed "st/mesa: use fragment shader to copy stencil buffer" commit.

CI results for updated changes:

Edited by Danylo Piliaiev

Merge request reports