This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Cap legal fixed-length vectors to 256-element types
ClosedPublic

Authored by frasercrmck on May 4 2021, 8:15 AM.

Details

Summary

Previously, RISC-V would make legal all fixed-length vectors types whose
size are less than or equal to some function of the minimum value of
VLEN and the maximum-permissible LMUL grouping.

Due to vector legalization issues, this patch instead caps the legal
fixed-length vector types to those with 256 elements. This value was
chosen because it is the longest vector length which has corresponding
MVTs across all supported element types.

Diff Detail

Event Timeline

frasercrmck created this revision.May 4 2021, 8:15 AM
frasercrmck requested review of this revision.May 4 2021, 8:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2021, 8:15 AM
frasercrmck retitled this revision from [RISCV] Cap legal fixed-length vectors 256-element types to [RISCV] Cap legal fixed-length vectors to 256-element types.May 4 2021, 8:19 AM
craig.topper accepted this revision.May 4 2021, 11:47 AM

LGTM. I wonder a little if this should be a total vector size limit. So that all bitcasts are all legal, but this is a good starting point at least.

This revision is now accepted and ready to land.May 4 2021, 11:47 AM

LGTM. I wonder a little if this should be a total vector size limit. So that all bitcasts are all legal, but this is a good starting point at least.

Good question. I think it's worth exploring; I'll make a note.