From: Rhys Perry Date: Tue, 16 Jun 2020 16:43:01 +0000 (+0100) Subject: aco: don't create v_mad_f32 on GFX10.3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f1242a4d8c6e0be22565a03a8d5b8ea19c3382d;p=mesa.git aco: don't create v_mad_f32 on GFX10.3 Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index c1f0bc20f9e..d060f378fe2 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2614,7 +2614,7 @@ void combine_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr instr->opcode == aco_opcode::v_sub_f16 || instr->opcode == aco_opcode::v_subrev_f16; if (mad16 || mad32) { - bool need_fma = mad32 ? block.fp_mode.denorm32 != 0 : + bool need_fma = mad32 ? (block.fp_mode.denorm32 != 0 || ctx.program->chip_class >= GFX10_3) : (block.fp_mode.denorm16_64 != 0 || ctx.program->chip_class >= GFX10); if (need_fma && instr->definitions[0].isPrecise()) return;