[PATCH] D103674: [ARM] Use rq gather/scatters for smaller v4 vectors

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 01:04:02 PDT 2021


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

A pointer will always fit into an i32, so a rq offset gather/scatter can be used with v4i8 and v4i16 gathers, using a base of 0 and the Ptr as the offsets. The rq gather can then correctly extend the type, allowing us to use the gathers without falling back to scalarizing.

This patch rejigs tryCreateMaskedGatherOffset in the MVEGatherScatterLowering pass to decompose the Ptr into Base:0 + Offset:Ptr (with a scale of 1), if the Ptr could not be decomposed from a GEP. v4i32 gathers will already use qi gathers, this extends that to v4i8 and v4i16 gathers using the extending rq variants.


https://reviews.llvm.org/D103674

Files:
  llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
  llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll
  llvm/test/CodeGen/Thumb2/mve-scatter-ind32-scaled.ll
  llvm/test/CodeGen/Thumb2/mve-scatter-ptrs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103674.349779.patch
Type: text/x-patch
Size: 11373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210604/1f996967/attachment.bin>


More information about the llvm-commits mailing list