[PATCH] D117499: [CodeGen] Support extracting fixed-length vectors from illegal scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 08:46:08 PST 2022


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, efriedma, MattDevereau.
Herald added subscribers: ctetreau, hiraditya, kristof.beyls.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

For some indices we can simply extract the fixed-length subvector from the
low half of the scalable vector, for example when the index is less than the
minimum number of elements in the low half. For all other cases we can
expand the operation through the stack by storing out the vector and
reloading the fixed-length part we need.

Tests added here:

  CodeGen/AArch64/sve-extract-fixed-from-scalable-vector.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117499

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/test/CodeGen/AArch64/sve-extract-fixed-from-scalable-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117499.400566.patch
Type: text/x-patch
Size: 9811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220117/0d273bc3/attachment.bin>


More information about the llvm-commits mailing list