[PATCH] D95381: [ARM] Select VINS from vector inserts

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 11:43:07 PST 2021


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

This patch adds tablegen patterns for pairs of i16/f16 insert/extracts. If we are inserting into two adjacent vector lanes (0 and 1 for example), we can use either a `vmov; vins` or vmovx; vins` to insert the pair together, avoiding a round-trip from GRP registers. This is quite a large patterns with a number of EXTRACT_SUBREG/INSERT_SUBREG/COPY_TO_REGCLASS nodes, but hopefully as most of those become copies all that will be cleaned up by further optimizations.

The VINS pattern was also adjusted to allow it to represent that it is inserting into the top half of an existing register.


https://reviews.llvm.org/D95381

Files:
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/lib/Target/ARM/ARMInstrVFP.td
  llvm/test/CodeGen/Thumb2/mve-shuffle.ll
  llvm/test/CodeGen/Thumb2/mve-shufflemov.ll
  llvm/test/CodeGen/Thumb2/mve-vld2.ll
  llvm/test/CodeGen/Thumb2/mve-vld3.ll
  llvm/test/CodeGen/Thumb2/mve-vld4.ll
  llvm/test/CodeGen/Thumb2/mve-vldst4.ll
  llvm/test/CodeGen/Thumb2/mve-vmovn.ll
  llvm/test/CodeGen/Thumb2/mve-vmovnstore.ll
  llvm/test/CodeGen/Thumb2/mve-vqdmulh.ll
  llvm/test/CodeGen/Thumb2/mve-vst2.ll
  llvm/test/CodeGen/Thumb2/mve-vst3.ll
  llvm/test/CodeGen/Thumb2/mve-vst4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95381.319070.patch
Type: text/x-patch
Size: 149452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/7f6be6a4/attachment.bin>


More information about the llvm-commits mailing list