diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 9cf1f45d471..1dbd0151441 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2685,7 +2685,7 @@ get_affinities(ra_ctx& ctx, std::vector& live_out_per_block) op = instr->operands[op_fixed_to_def0]; } else if (vop3_can_use_vop2acc(ctx, instr.get())) { op = instr->operands[2]; - } else if (sop2_can_use_sopk(ctx, instr.get())) { + } else if (i == 0 && sop2_can_use_sopk(ctx, instr.get())) { op = instr->operands[instr->operands[0].isLiteral()]; } else { continue;