[PATCH] D84937: [SVE][CodeGen] Fix scalable vector issues in DAGTypeLegalizer::GenWidenVectorStores

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 05:37:52 PDT 2020


david-arm created this revision.
david-arm added reviewers: sdesmalen, efriedma, kmclaughlin.
Herald added subscribers: llvm-commits, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
david-arm requested review of this revision.

In DAGTypeLegalizer::GenWidenVectorStores the algorithm assumes it only
ever deals with fixed width types, hence the offsets for each individual
store never take 'vscale' into account. The existing algorithm is too
complex to adapt to take scalable vectors into account, hence I've
added a specialised loop purely to deal with scalable vectors. In this
new loop I've assumed that we'll only ever choose a legal scalable
vector to store out in parts. From looking at FindMemType I think this
is correct.

Whilst fixing this function I also fixed a minor issue in
IncrementPointer whereby we were not adding the no-unsigned-wrap flag
for the add instruction in the same way as the fixed width case does.

Also, I've added a report_fatal_error in GenWidenVectorTruncStores,
since this code currently uses a sequence of element-by-element scalar
stores.

I've added new tests in

  CodeGen/AArch64/sve-intrinsics-stores.ll
    
    for the changes in GenWidenVectorStores.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84937

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/test/CodeGen/AArch64/sve-intrinsics-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84937.281890.patch
Type: text/x-patch
Size: 7105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200730/c8f0f173/attachment.bin>


More information about the llvm-commits mailing list