From 5d2b2b59c451915c0b11184ae47c0673fdff3146 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 26 Aug 2020 13:09:09 -0700 Subject: [PATCH] nir: Invalidate live SSA def information when making new SSA defs. Noted by @jekstrand in review of the SSA live index changes. Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index a94ccf09be1..24515f05cb8 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -801,6 +801,8 @@ add_ssa_def_cb(nir_ssa_def *def, void *state) nir_cf_node_get_function(&instr->block->cf_node); def->index = impl->ssa_alloc++; + + impl->valid_metadata &= ~nir_metadata_live_ssa_defs; } return true; @@ -1503,6 +1505,8 @@ nir_ssa_def_init(nir_instr *instr, nir_ssa_def *def, nir_cf_node_get_function(&instr->block->cf_node); def->index = impl->ssa_alloc++; + + impl->valid_metadata &= ~nir_metadata_live_ssa_defs; } else { def->index = UINT_MAX; } -- 2.30.2