aco/gfx12: use s_sub_u64

fossil-db (gfx1201):
Totals from 2 (0.00% of 79377) affected shaders:
Instrs: 243999 -> 243993 (-0.00%)
CodeSize: 1288176 -> 1288152 (-0.00%)
Latency: 1894093 -> 1894091 (-0.00%)
InvThroughput: 378819 -> 378818 (-0.00%)
SALU: 33048 -> 33044 (-0.01%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34730>
This commit is contained in:
Rhys Perry 2025-04-23 16:28:57 +01:00 committed by Marge Bot
parent 5b4813c4f0
commit f390893a64

View file

@ -1934,6 +1934,9 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
} else if (dst.regClass() == v1 && instr->def.bit_size == 16) {
emit_vop3p_instruction(ctx, instr, aco_opcode::v_pk_sub_u16, dst);
break;
} else if (dst.regClass() == s2 && ctx->program->gfx_level >= GFX12) {
emit_sop2_instruction(ctx, instr, aco_opcode::s_sub_u64, dst, false);
break;
}
Temp src0 = get_alu_src(ctx, instr->src[0]);