From e9578e303386c22940b62a88ea85cea794124537 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 11 Jun 2020 14:05:48 +0100 Subject: [PATCH] aco: allow GFX9 partial writes with instructions which use opsel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some instructions such as v_mad_f16 can do partial writes on GFX9. No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 505f5cb613d..4841b5eb6f0 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -429,7 +429,7 @@ std::pair get_subdword_definition_info(Program *program, con if (can_use_SDWA(chip, instr)) { return std::make_pair(rc.bytes(), rc.bytes()); } else if (rc.bytes() == 2 && can_use_opsel(chip, instr->opcode, -1, 1)) { - return std::make_pair(2u, chip >= GFX10 ? 2u : 4u); + return std::make_pair(2u, bytes_written); } switch (instr->opcode) { -- 2.30.2