From 2f74df7117e2d4a5bd8d88807d0893b1b3753000 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 17 Jun 2022 16:25:42 +0100 Subject: [PATCH] aco: fix assembly of MUBUF-to-LDS loads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These have an implicit m0 read and don't write VGPRs. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_assembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 91e7e95..0ce5157 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -416,9 +416,9 @@ emit_instruction(asm_context& ctx, std::vector& out, Instruction* inst encoding |= reg(ctx, instr->operands[2]) << 24; encoding |= (mubuf.tfe ? 1 : 0) << 23; encoding |= (reg(ctx, instr->operands[0]) >> 2) << 16; - if (instr->operands.size() > 3) + if (instr->operands.size() > 3 && !mubuf.lds) encoding |= reg(ctx, instr->operands[3], 8) << 8; - else + else if (!mubuf.lds) encoding |= reg(ctx, instr->definitions[0], 8) << 8; encoding |= reg(ctx, instr->operands[1], 8); out.push_back(encoding); -- 2.7.4