Module: Mesa Branch: main Commit: db8c401f71b5057b39f0dd4782784173a7091e5e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db8c401f71b5057b39f0dd4782784173a7091e5e
Author: Daniel Schürmann <[email protected]> Date: Mon Mar 14 13:56:12 2022 +0100 aco/ra: fix stride check on subdword parallelcopies for create_vector On GFX6/7, info.rc is in full dwords. Fixes: 9476986e6f6fe49ef8bc511f4ebeca4232263888 ('aco/ra: special-case get_reg_for_create_vector_copy()') Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15393> --- 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 00c273fc5fc..41c36603608 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1041,8 +1041,8 @@ get_reg_for_create_vector_copy(ra_ctx& ctx, RegisterFile& reg_file, for (unsigned i = 0; i < instr->operands.size(); i++) { if (instr->operands[i].isTemp() && instr->operands[i].tempId() == id && instr->operands[i].isKillBeforeDef()) { - assert(!reg_file.test(reg, info.rc.bytes())); - return {reg, !info.rc.is_subdword() || (reg.byte() % info.stride == 0)}; + assert(!reg_file.test(reg, instr->operands[i].bytes())); + return {reg, info.rc.is_subdword() || reg.byte() == 0}; } reg.reg_b += instr->operands[i].bytes(); }
