summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_to_lcssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_to_lcssa.c')
-rw-r--r--src/compiler/nir/nir_to_lcssa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_to_lcssa.c b/src/compiler/nir/nir_to_lcssa.c
index 9b3539193ea..0f62fc39400 100644
--- a/src/compiler/nir/nir_to_lcssa.c
+++ b/src/compiler/nir/nir_to_lcssa.c
@@ -111,6 +111,9 @@ convert_loop_exit_for_ssa(nir_ssa_def *def, void *void_state)
if (all_uses_inside_loop)
return true;
+ /* We don't want derefs ending up in phi sources */
+ assert(def->parent_instr->type != nir_instr_type_deref);
+
/* Initialize a phi-instruction */
nir_phi_instr *phi = nir_phi_instr_create(state->shader);
nir_ssa_dest_init(&phi->instr, &phi->dest,