[PATCH] D106531: [ARM] Turn vecreduce_add(add(x, y)) into vecreduce(x) + vecreduce(y)

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 02:07:37 PDT 2021


dmgreen created this revision.
dmgreen added reviewers: samtebbs, SjoerdMeijer, NickGuy, ostannard, simon_tatham.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Under MVE we can use VADDV/VADDVA's to perform integer add reductions, so it can be beneficial to use more reductions than summing subvectors and reducing once. Especially for VMLAV/VMLAVA the mul can be incorporated into the reduction, producing less instructions.

Some of the test cases currently get larger due to extra integer adds, but will be improved in a followup patch.


https://reviews.llvm.org/D106531

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/Thumb2/mve-vaddv.ll
  llvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll
  llvm/test/CodeGen/Thumb2/mve-vecreduce-mlapred.ll
  llvm/test/CodeGen/Thumb2/mve-vecreduce-slp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106531.360732.patch
Type: text/x-patch
Size: 45465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210722/23284bca/attachment.bin>


More information about the llvm-commits mailing list