[PATCH] D67828: [ARM] Split large truncating MVE stores

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 04:38:58 PDT 2019


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

MVE does not have a simple sign extend instruction that can move elements across lanes. We currently often end up moving each lane into and out of a GPR, in order to get elements into the correct places.  When we have a store of a trunc (or a extend of a load), we can instead just split the store/load in two, using the narrowing/widening load/store instructions from each half of the vector.

This does that for stores. It happens very early in a store combine, so as to easily detect the truncates. (It would be possible to do this later, but that would involve looking through a buildvector of extract elements. Not impossible but this way seemed simpler).

By enabling store combines we also get a vmovdrr combine for free, helping some other tests.


https://reviews.llvm.org/D67828

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/Thumb2/float-ops.ll
  llvm/test/CodeGen/Thumb2/mve-masked-store.ll
  llvm/test/CodeGen/Thumb2/mve-widen-narrow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67828.220996.patch
Type: text/x-patch
Size: 12133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/041849f0/attachment.bin>


More information about the llvm-commits mailing list