[PATCH] D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 06:12:04 PST 2022


Petar.Avramovic added a comment.

Now that I checked in tests with madmix that has sgpr input, copy is not created but it should have been.
Patch is not correct at this state.
Is there a way to move

  if (!MatchedSrc0 && !MatchedSrc1 && !MatchedSrc2)
    return false;

in selectG_FMA_FMAD before lookup for modifiers begin via selectVOP3PMadMixModsImpl?

What looks equivalent to me is to check if at least one of the operands is fpext (could be hidden behind other instructions that could be folded into mods). Unfortunately this still has to call getVOP3ModsImpl on each operand at worst case before actual mods selection begins


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138044/new/

https://reviews.llvm.org/D138044



More information about the llvm-commits mailing list