[RISCV] Support fixed-length INSERT_VECTOR_ELT
authorFraser Cormack <fraser@codeplay.com>
Mon, 1 Mar 2021 15:31:56 +0000 (15:31 +0000)
committerFraser Cormack <fraser@codeplay.com>
Tue, 2 Mar 2021 16:48:38 +0000 (16:48 +0000)
commitc1695ddf7da604a8bb3ca779f4f318e44d38a35f
tree224c006c64ce03c32a82bfe2bd98581b15ac7bcc
parent91679c95bbedf4f816a456028ebd23ea6c5cc08f
[RISCV] Support fixed-length INSERT_VECTOR_ELT

This patch enables support for lowering INSERT_VECTOR_ELT on
fixed-length vector types. The strategy follows that for scalable vector
types.

This patch also includes a quick fix to prevent the compiler infinitely
looping between lowering BUILD_VECTOR as VECTOR_SHUFFLE and back again.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97698
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert.ll