radeonsi: clean up ffma handling
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6596>
This commit is contained in:
@@ -853,10 +853,10 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
|
||||
}
|
||||
break;
|
||||
case nir_op_ffma:
|
||||
/* FMA is better on GFX10, because it has FMA units instead of MUL-ADD units. */
|
||||
result =
|
||||
emit_intrin_3f_param(&ctx->ac, ctx->ac.chip_class >= GFX10 ? "llvm.fma" : "llvm.fmuladd",
|
||||
ac_to_float_type(&ctx->ac, def_type), src[0], src[1], src[2]);
|
||||
/* FMA is slow on gfx6-8, so it shouldn't be used. */
|
||||
assert(ctx->ac.chip_class >= GFX9);
|
||||
result = emit_intrin_3f_param(&ctx->ac, "llvm.fma", ac_to_float_type(&ctx->ac, def_type),
|
||||
src[0], src[1], src[2]);
|
||||
break;
|
||||
case nir_op_ldexp:
|
||||
src[0] = ac_to_float(&ctx->ac, src[0]);
|
||||
|
||||
Reference in New Issue
Block a user