nir/copy_prop_vars: Record progress in more places
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 28 May 2019 19:40:35 +0000 (14:40 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 22 May 2020 18:41:15 +0000 (18:41 +0000)
Fixes: 96c32d7776 "nir/copy_prop_vars: handle load/store of vector..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>

src/compiler/nir/nir_opt_copy_prop_vars.c

index 77bf2c94dde928f4b2fecb21bc65a0af90aa447f..d471c89fbb689ebf67df5062d5b0c9dd50c1f6b4 100644 (file)
@@ -868,6 +868,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
                b->cursor = nir_instr_remove(instr);
                nir_ssa_def *u = nir_ssa_undef(b, 1, intrin->dest.ssa.bit_size);
                nir_ssa_def_rewrite_uses(&intrin->dest.ssa, nir_src_for_ssa(u));
+               state->progress = true;
                break;
             }
          }
@@ -948,6 +949,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
             /* Storing to an invalid index is a no-op. */
             if (vec_index >= vec_comps) {
                nir_instr_remove(instr);
+               state->progress = true;
                break;
             }
          }
@@ -965,6 +967,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
              * store is redundant so remove it.
              */
             nir_instr_remove(instr);
+            state->progress = true;
          } else {
             struct value value = {0};
             value_set_ssa_components(&value, intrin->src[1].ssa,