From 51a2e1eb946a13afe059bc73cb7c30fca2967512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 2 Apr 2025 19:11:35 +0200 Subject: [PATCH] aco/ra: don't use kill-flags as indicator in get_reg_create_vector() We are about to re-use this function for vector-aligned operands. Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 701f0430ae3..d531dbb1def 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1992,8 +1992,8 @@ get_reg_create_vector(ra_ctx& ctx, const RegisterFile& reg_file, Temp temp, for (unsigned i = 0, offset = 0; i < instr->operands.size(); offset += instr->operands[i].bytes(), i++) { // TODO: think about, if we can alias live operands on the same register - if (!instr->operands[i].isTemp() || !instr->operands[i].isKillBeforeDef() || - instr->operands[i].getTemp().type() != rc.type()) + if (!instr->operands[i].isTemp() || instr->operands[i].getTemp().type() != rc.type() || + reg_file.test(instr->operands[i].physReg(), instr->operands[i].bytes())) continue; if (offset > instr->operands[i].physReg().reg_b)