From 8db66767a9f0243bcd0da32891a005db548ab126 Mon Sep 17 00:00:00 2001 From: Christoph Pillmayer Date: Mon, 10 Nov 2025 13:35:06 +0000 Subject: [PATCH] nir: Fix preseved metadata in sort_unstructured_blocks Fixes: c859ea5783b ("nir: Add a sort_unstructured_blocks() helper") Reviewed-by: Erik Faye-Lund Reviewed-by: Faith Ekstrand Reviewed-by: Mel Henning Part-of: --- src/compiler/nir/nir_control_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_control_flow.c b/src/compiler/nir/nir_control_flow.c index fcd86826915..75bb9b0309f 100644 --- a/src/compiler/nir/nir_control_flow.c +++ b/src/compiler/nir/nir_control_flow.c @@ -968,7 +968,7 @@ nir_sort_unstructured_blocks(nir_function_impl *impl) ralloc_free(blocks); - /* Dominance is toast but we indexed blocks as part of this pass. */ - impl->valid_metadata &= nir_metadata_dominance; + /* Most metadata is toast but we indexed blocks as part of this pass. */ + impl->valid_metadata &= nir_metadata_live_defs; impl->valid_metadata |= nir_metadata_block_index; }