From 4a5f2a1c156879e15c221445210d86605e4ec295 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 May 2024 15:45:29 +0100 Subject: [PATCH] aco: don't combine vgpr into writelane src0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Acked-by: Daniel Schürmann Cc: mesa-stable Part-of: (cherry picked from commit 0dee5fdd3c88a5b45738d0aef1f5c03af753eaf8) --- .pick_status.json | 2 +- src/amd/compiler/aco_optimizer.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index a905a360859..4a4b0fba545 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -724,7 +724,7 @@ "description": "aco: don't combine vgpr into writelane src0", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 3572f1a614f..2766da6a9dd 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -703,13 +703,13 @@ alu_can_accept_constant(const aco_ptr& instr, unsigned operand) bool valu_can_accept_vgpr(aco_ptr& instr, unsigned operand) { - if (instr->opcode == aco_opcode::v_readlane_b32 || - instr->opcode == aco_opcode::v_readlane_b32_e64 || - instr->opcode == aco_opcode::v_writelane_b32 || + if (instr->opcode == aco_opcode::v_writelane_b32 || instr->opcode == aco_opcode::v_writelane_b32_e64) - return operand != 1; + return operand == 2; if (instr->opcode == aco_opcode::v_permlane16_b32 || - instr->opcode == aco_opcode::v_permlanex16_b32) + instr->opcode == aco_opcode::v_permlanex16_b32 || + instr->opcode == aco_opcode::v_readlane_b32 || + instr->opcode == aco_opcode::v_readlane_b32_e64) return operand == 0; return true; }