From 068640e23b5bb718dbcc3be71268fe7df78c397b Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 7 Sep 2020 20:21:37 +0100 Subject: [PATCH] aco: don't apply constant to SDWA on GFX8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Cc: 20.2 Part-of: (cherry picked from commit 5a8447cbd40ef29a4225686d4820a8b0a19973ae) --- .pick_status.json | 2 +- src/amd/compiler/aco_optimizer.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f29d68b0367..9594fa79d2f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -850,7 +850,7 @@ "description": "aco: don't apply constant to SDWA on GFX8", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index d060f378fe2..5c7bf2ae5cd 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -903,7 +903,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr) continue; } unsigned bits = get_operand_size(instr, i); - if (info.is_constant(bits) && alu_can_accept_constant(instr->opcode, i)) { + if (info.is_constant(bits) && alu_can_accept_constant(instr->opcode, i) && + (!instr->isSDWA() || ctx.program->chip_class >= GFX9)) { Operand op = get_constant_op(ctx, info, bits); perfwarn(instr->opcode == aco_opcode::v_cndmask_b32 && i == 2, "v_cndmask_b32 with a constant selector", instr.get()); if (i == 0 || instr->opcode == aco_opcode::v_readlane_b32 || instr->opcode == aco_opcode::v_writelane_b32) {