[PATCH] D158008: [AArch64] Add patterns for FMADD, FMSUB

Vladislav Dzhidzhoev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 09:11:39 PDT 2023


dzhidzhoev accepted this revision.
dzhidzhoev added a subscriber: arsenm.
dzhidzhoev added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:5393
+              (EXTRACT_SUBREG V128:$Rn, hsub), FPR16:$Rm, FPR16:$Ra)>;
+  }
+
----------------
overmighty wrote:
> dzhidzhoev wrote:
> > BTW, these lines add some patterns for fnmadd. Could you add some tests for them? Or are they already covered by existing ones?
> The patterns for `FNMADD` and `FNMSUB` are useless as there are no Neon vector equivalents of these instructions. Should I add a template argument to `ThreeOperandFPData` to prevent the patterns from being generated for them?
> 
> I previously had patterns in AArch64InstrInfo.td for `FMADD` and `FMSUB` only and it was suggested to me to move them to `ThreeOperandFPData`: https://reviews.llvm.org/D153207?id=532433#inline-1481961. I was asked to split that part of my previous patch into a second (this) one.
> The patterns for `FNMADD` and `FNMSUB` are useless as there are no Neon vector equivalents of these instructions. Should I add a template argument to `ThreeOperandFPData` to prevent the patterns from being generated for them?

Thank you for the explanation! There's no need for it since I can barely find a way it can interfere with other patterns.



================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:5418
+              (EXTRACT_SUBREG V128:$Rn, dsub), FPR64:$Rm, FPR64:$Ra)>;
 }
 
----------------
overmighty wrote:
> dzhidzhoev wrote:
> > Is it possible to use extractelt here? Since vector_extract is marked as deprecated in `TargetSelectionDAG.td`
> I saw the comment marking it as deprecated but I also saw new commits using `vector_extract`. I should have asked for clarification earlier. Is `vector_extract` truly deprecated? Should I change patterns I added in previous patches to use `extractelt` too?
Thank you! Now I've noticed that the comment about the deprecation was made in 2015, and vector_extract is still in use. @arsenm, could you suggest whether it is relevant?


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

https://reviews.llvm.org/D158008



More information about the cfe-commits mailing list