From b20fd0ef486966924b15260c0f37d2c738b88d1d Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Wed, 30 Jul 2025 21:37:44 +0200 Subject: [PATCH] nir: Remove parallel copy handling from rewrite_uses_to_load_reg Parallel copies are only created by nir_convert_from_ssa which does not use the helper. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_from_ssa.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index bb49337085c..207de2d474b 100644 --- a/src/compiler/nir/nir_from_ssa.c +++ b/src/compiler/nir/nir_from_ssa.c @@ -540,19 +540,6 @@ nir_rewrite_uses_to_load_reg(nir_builder *b, nir_def *old, nir_foreach_use_including_if_safe(use, old) { b->cursor = nir_before_src(use); - /* If this is a parallel copy, it can just take the register directly */ - if (!nir_src_is_if(use) && - nir_src_parent_instr(use)->type == nir_instr_type_parallel_copy) { - - nir_parallel_copy_entry *copy_entry = - list_entry(use, nir_parallel_copy_entry, src); - - assert(!copy_entry->src_is_reg); - copy_entry->src_is_reg = true; - nir_src_rewrite(©_entry->src, reg); - continue; - } - /* If the immediate preceding instruction is a load_reg from the same * register, use it instead of creating a new load_reg. This helps when * a register is referenced in multiple sources in the same instruction,