From 75b89f233fd237e260a15eb814d4528e6f69e5d5 Mon Sep 17 00:00:00 2001 From: Natalie Vock Date: Sun, 19 Oct 2025 17:14:03 +0200 Subject: [PATCH] aco/ra: Don't clear fixed operand sources if they were blocked That would undo the blocking and allow for conflicting assignments. Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index f5819f542c8..ff12f56c500 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2367,8 +2367,11 @@ handle_fixed_operands(ra_ctx& ctx, RegisterFile& register_file, assert(std::none_of(parallelcopy.begin(), parallelcopy.end(), [&](auto copy) { return copy.def.physReg() == op.physReg(); })); - /* clear from register_file so fixed operands are not collected by collect_vars() */ - tmp_file.clear(src, op.regClass()); + /* clear from register_file so fixed operands are not collected by collect_vars(), but if src + * has been blocked by a previous operand, don't undo the blocking + */ + if (!tmp_file.is_blocked(src)) + tmp_file.clear(src, op.regClass()); BITSET_SET(mask, i);