From a4e84c9244f0392950e1ba00654d4250c7fe6ccf Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 12 Dec 2025 15:29:35 -0800 Subject: [PATCH] nir/gcm: Consider dead code elimination done by GCM as progress This will also fix NIR_DEBUG=extended_validation complaining about invalid loop analysis. GCM will invalidate loop analysis if progress was made, and depending on the removed instruction it will affect the instr_cost. Cc: mesa-stable Reviewed-by: Alyssa Rosenzweig Reviewed-by: Ian Romanick Part-of: --- src/compiler/nir/nir_opt_gcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_gcm.c b/src/compiler/nir/nir_opt_gcm.c index 0a2e1f53414..070b8444564 100644 --- a/src/compiler/nir/nir_opt_gcm.c +++ b/src/compiler/nir/nir_opt_gcm.c @@ -759,6 +759,7 @@ gcm_place_instr(nir_instr *instr, struct gcm_state *state) if (instr->block == NULL) { nir_foreach_def(instr, gcm_replace_def_with_undef, state); nir_instr_remove(instr); + state->progress = true; return; }