[PATCH] D80524: [ARM] Extra MVE VMLAV reduction patterns

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 09:38:06 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: efriedma, SjoerdMeijer, samparker, simon_tatham, ostannard.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.

These patterns for i8 and i16 VMLA's were missing. They end up from legalized vector.reduce.add.v8i16 and vector.reduce.add.v16i8, and although the instruction works differently (the mul and add are performed in a higher precision), I believe it is OK because only an i8/i16 are demanded from them, and so the results will be the same. At least, they pass any testing I can think to run on them.

There are some tests that end up looking worse, but are quite artificial due to passing half vector types through a call boundary. I would not expect the vmull to realistically come up like that, and a vmlava is likely better a lot of the time.


https://reviews.llvm.org/D80524

Files:
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80524.266033.patch
Type: text/x-patch
Size: 6169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200525/4e2bf936/attachment-0001.bin>


More information about the llvm-commits mailing list