diff --git a/src/compiler/nir/nir_phi_builder.c b/src/compiler/nir/nir_phi_builder.c index 6b4b6939917..acfc771da2f 100644 --- a/src/compiler/nir/nir_phi_builder.c +++ b/src/compiler/nir/nir_phi_builder.c @@ -216,7 +216,7 @@ nir_phi_builder_value_get_block_def(struct nir_phi_builder_value *val, val->bit_size, NULL); phi->instr.block = dom; exec_list_push_tail(&val->phis, &phi->instr.node); - def = &phi->dest.ssa; + def = val->defs[dom->index] = &phi->dest.ssa; } else { /* In this case, we have an actual SSA def. It's either the result of a * phi node created by the case above or one passed to us through