aco: try to use fma instead of mad when denormals are enabled
[mesa.git] / src / amd / compiler / aco_instruction_selection_setup.cpp
index eb07e7b6a830dd2913be0ccd99df350cbb8b0f55..6bd36835ce2ca286881a56edcab0ffd2849b03c8 100644 (file)
@@ -1256,6 +1256,10 @@ setup_isel_context(Program* program,
 
    setup_xnack(program);
    program->sram_ecc_enabled = args->options->family == CHIP_ARCTURUS;
+   /* apparently gfx702 also has fast v_fma_f32 but I can't find a family for that */
+   program->has_fast_fma32 = program->chip_class >= GFX9;
+   if (args->options->family == CHIP_TAHITI || args->options->family == CHIP_CARRIZO || args->options->family == CHIP_HAWAII)
+      program->has_fast_fma32 = true;
 
    return ctx;
 }