nir: implement the GLSL equivalent of if simplication in nir_opt_if