-static bool
-copy_prop_block(nir_block *block, void *_state)
-{
- bool *progress = (bool *) _state;
+ if (nir_intrinsic_infos[intrin->intrinsic].has_dest) {
+ while (copy_prop_dest(&intrin->dest, instr))
+ progress = true;
+ }
+
+ return progress;
+ }
+
+ case nir_instr_type_phi: {
+ nir_phi_instr *phi = nir_instr_as_phi(instr);
+ assert(phi->dest.is_ssa);
+ unsigned num_components = phi->dest.ssa.num_components;
+ nir_foreach_phi_src(src, phi) {
+ while (copy_prop_src(&src->src, instr, NULL, num_components))
+ progress = true;
+ }