[RISCV] Cap legal fixed-length vectors to 256-element types
authorFraser Cormack <fraser@codeplay.com>
Tue, 4 May 2021 14:18:28 +0000 (15:18 +0100)
committerFraser Cormack <fraser@codeplay.com>
Wed, 5 May 2021 08:51:08 +0000 (09:51 +0100)
commitcd6a52fedefe263565b81fbee9d5d3278e1e63cb
tree4d2c8219dee9d0702d8f652dd20d7c20adb6c284
parenta1ed39df96bc5b98bd5a83c7d2c1a385c03133e5
[RISCV] Cap legal fixed-length vectors to 256-element types

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.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D101839
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/interleave-crash.ll