[RISCV] Fix crash when inserting large fixed-length subvectors
authorFraser Cormack <fraser@codeplay.com>
Wed, 3 Mar 2021 16:39:43 +0000 (16:39 +0000)
committerFraser Cormack <fraser@codeplay.com>
Thu, 4 Mar 2021 09:27:16 +0000 (09:27 +0000)
commit8e7ceffd0b78b17e92fb9e8b3fda6aa6e122eb87
treedb331b699cfc630ad98c3ddd8d0242a23369eb57
parentd8e1d2ebf47f8621cc17b5dd2401db95647554fb
[RISCV] Fix crash when inserting large fixed-length subvectors

This patch addresses a compiler crash resulting from passing a
fixed-length type to one that expects scalable vector types. An
assertion was added to prevent this regressing in the future.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97868
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-splat-rv32.ll