[ValueTypes][RISCV] Cap RVV fixed-length vectors by size
authorFraser Cormack <fraser@codeplay.com>
Mon, 7 Jun 2021 07:39:22 +0000 (08:39 +0100)
committerFraser Cormack <fraser@codeplay.com>
Wed, 9 Jun 2021 11:15:37 +0000 (12:15 +0100)
commit502edebd9d6eb4665add9fd5edaa2dd1b1b24298
tree60c54340a8e0cf3d567de24131c55a637659f320
parentc92f505346b80fd053ef191bbc66810c9d564b0c
[ValueTypes][RISCV] Cap RVV fixed-length vectors by size

This patch changes RVV's policy for its supported list of fixed-length
vector types by capping by vector size rather than element count. Now
all 1024-byte vectors (of supported element types) are supported, rather
than all 256-element vectors.

This is a more natural fit for the architecture, and allows us to, for
example, improve the support for vector bitcasts.

This change necessitated the adding of some new simple types to avoid
"regressing" on the number of currently-supported vectors. We round out
the 1024-byte types by adding `v512i8`, `v1024i8`, `v512i16` and
`v512f16`.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103884
llvm/include/llvm/CodeGen/ValueTypes.td
llvm/include/llvm/Support/MachineValueType.h
llvm/lib/CodeGen/ValueTypes.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast-large-vector.ll
llvm/test/CodeGen/RISCV/rvv/interleave-crash.ll
llvm/utils/TableGen/CodeGenTarget.cpp