This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Support fixed-length vector truncates
ClosedPublic

Authored by frasercrmck on Feb 22 2021, 9:01 AM.

Details

Summary

This patch extends support for our custom-lowering of scalable-vector
truncates to include those of fixed-length vectors. It does this by
co-opting the custom RISCVISD::TRUNCATE_VECTOR node and adding mask and
VL operands. This avoids unnecessary duplication of patterns and
inflation of the ISel table.

Some truncates go through CONCAT_VECTORS which currently isn't
efficiently handled, as it goes through the stack. This can be improved
upon in the future.

Diff Detail

Event Timeline

frasercrmck created this revision.Feb 22 2021, 9:01 AM
frasercrmck requested review of this revision.Feb 22 2021, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2021, 9:01 AM
This revision is now accepted and ready to land.Feb 22 2021, 12:49 PM
  • rebase
  • regenerate tests (vsetivli)
This revision was automatically updated to reflect the committed changes.