aco/ra: fix affinity for s_addk

The first, non SCC def matters.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 39380d475a ("aco: add affinities for possible sopk optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29943>
This commit is contained in:
Georg Lehmann 2024-06-27 17:28:48 +02:00 committed by Marge Bot
parent fab95c78f9
commit cd9187a1e1

View file

@ -2685,7 +2685,7 @@ get_affinities(ra_ctx& ctx, std::vector<IDSet>& 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;