[PATCH] D112557: [SVE] Fix VLS FMA generation at CodeGenOpt::Aggressive

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 09:41:04 PDT 2021


cameron.mcinally created this revision.
cameron.mcinally added reviewers: paulwalker-arm, david-arm, c-rhodes.
Herald added subscribers: steven.zhang, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
cameron.mcinally requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

@paulwalker-arm Here is a hastily prepared patch of the problem we discussed earlier today. I'm a little out of the VLS loop, so perhaps there is a better way to handle this...

For VLS lowering, the DAGCombiner is not matching fixed width vector FMAs at CodeGenOpt::Aggressive, since the FMA matching at CodeGenOpt::Aggressive is done in the MachineCombiner. However, when the MachineCombiner runs, we have not yet lowered fixed width vectors to scalable vectors, so FMAs are not generated at all. This patch corrects that by allowing the DAGCombiner to match FMAs if we are using VLS.


https://reviews.llvm.org/D112557

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/sve-fixed-length-fp-fma.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112557.382372.patch
Type: text/x-patch
Size: 10862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211026/1685b84e/attachment.bin>


More information about the llvm-commits mailing list