diff options
-rw-r--r-- | src/compiler/nir/nir_opt_copy_prop_vars.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index d8c4cab34d7..d549b6315b1 100644 --- a/src/compiler/nir/nir_opt_copy_prop_vars.c +++ b/src/compiler/nir/nir_opt_copy_prop_vars.c @@ -352,6 +352,9 @@ store_to_entry(struct copy_prop_var_state *state, struct copy_entry *entry, { entry->comps_may_be_read &= ~write_mask; if (value->is_ssa) { + /* Clear src if it was being used as non-SSA. */ + if (!entry->src.is_ssa) + memset(entry->src.ssa, 0, sizeof(entry->src.ssa)); entry->src.is_ssa = true; /* Only overwrite the written components */ for (unsigned i = 0; i < 4; i++) { |