aco: don't create v_madmk_f32/v_madak_f32 from v_fma_legacy_f16

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5105
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12004>
This commit is contained in:
Rhys Perry 2021-07-21 20:18:12 +01:00 committed by Marge Bot
parent 215adc2f18
commit 211d1dfd34
1 changed files with 5 additions and 0 deletions

View File

@ -3760,6 +3760,11 @@ select_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
if ((instr->opcode == aco_opcode::v_fma_f32 || instr->opcode == aco_opcode::v_fma_f16) &&
ctx.program->chip_class < GFX10)
return;
/* There are no v_fmaak_legacy_f16/v_fmamk_legacy_f16 and on chips where VOP3 can take
* literals (GFX10+), these instructions don't exist.
*/
if (instr->opcode == aco_opcode::v_fma_legacy_f16)
return;
bool sgpr_used = false;
uint32_t literal_idx = 0;