ac/llvm: support new multadd opcodes

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
Karol Herbst 2026-04-24 01:03:35 +02:00 committed by Marge Bot
parent a80e254fd4
commit 04696f9bf9

View file

@ -759,11 +759,13 @@ static bool visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
result = ac_build_canonicalize(&ctx->ac, result, instr->def.bit_size);
}
break;
case nir_op_ffma:
case nir_op_ffma_old:
/* FMA is slow on gfx6-8, so it shouldn't be used. */
assert(instr->def.bit_size != 32 || ctx->ac.gfx_level >= GFX9);
result = emit_fp_intrinsic(&ctx->ac, "llvm.fma", def_type, src[0], src[1], src[2]);
break;
case nir_op_ffmaz:
case nir_op_ffmaz_old:
assert(ctx->ac.gfx_level >= GFX10_3);
src[0] = ac_to_float(&ctx->ac, src[0]);