[RISCV] Support inline asm for vector instructions.
authorHsiangkai Wang <kai.wang@sifive.com>
Tue, 9 Mar 2021 00:53:02 +0000 (08:53 +0800)
committerHsiangkai Wang <kai.wang@sifive.com>
Mon, 15 Mar 2021 03:02:18 +0000 (11:02 +0800)
commita81dff1e58390ccd438b9d5ffeb289783f2ccd29
treea027ab998ad20e1e4661339b196ff42b13d4396b
parentb5d9a3c92358349d5444ab28de8ab5b2bee33a01
[RISCV] Support inline asm for vector instructions.

Types of fractional LMUL and LMUL=1 are all using VR register class. When
using inline asm, it will use the first type in the register class as the
type for the register. It is not necessary the same as the value type. We
need to use INSERT_SUBVECTOR/EXTRACT_SUBVECToR/BITCAST to make it legal
to put the value in the corresponding register class.

Differential Revision: https://reviews.llvm.org/D97480
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVRegisterInfo.td
llvm/test/CodeGen/RISCV/rvv/inline-asm.ll [new file with mode: 0644]