Page MenuHomePhabricator

[RISCV] Begin to support more subvector inserts/extracts
ClosedPublic

Authored by frasercrmck on Feb 17 2021, 8:33 AM.

Details

Summary

This patch adds support for INSERT_SUBVECTOR and EXTRACT_SUBVECTOR
(nominally where both operands are scalable vector types) where the
vector, subvector, and index align sufficiently to allow decomposition
to subregister manipulation:

  • For extracts, the extracted subvector must correctly align with the

lower elements of a vector register.

  • For inserts, the inserted subvector must be at least one full vector

register, and correctly align as above.

This approach should work for fixed-length vector insertion/extraction
too, but that will come later.

Diff Detail

Event Timeline

frasercrmck created this revision.Feb 17 2021, 8:33 AM
frasercrmck requested review of this revision.Feb 17 2021, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 8:33 AM
  • add an additional test
This revision is now accepted and ready to land.Feb 17 2021, 10:18 AM
khchen added inline comments.Feb 17 2021, 5:54 PM
llvm/test/CodeGen/RISCV/rvv/insert-subvector.ll
193

Maybe Extracts should be Inserts?

arcbbb accepted this revision.Feb 17 2021, 7:23 PM

LGTM

frasercrmck marked an inline comment as done.
  • rebase
  • fix typo in test
llvm/test/CodeGen/RISCV/rvv/insert-subvector.ll
193

Good catch, thanks.

khchen accepted this revision.Feb 18 2021, 1:44 AM

LGTM