[RISCV] Add rvv codegen support for vp.fptrunc.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Fri, 15 Apr 2022 06:54:27 +0000 (06:54 +0000)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Tue, 19 Apr 2022 01:56:18 +0000 (01:56 +0000)
commit25445b94dbcd8dc85e2741d1c5b1fc595f97c931
treef9af17616f67bdac59a2f87724e7760b791bb3c0
parent1881d6fc80ef6612400d5269d0f52da9d9ba7d38
[RISCV] Add rvv codegen support for vp.fptrunc.

This patch adds rvv codegen support for vp.fptrunc. The lowering of fp_round and vp.fptrunc share most code so use a common lowering function to handle those two, similar to vp.trunc.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D123841
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fixed-vector-fptrunc-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/vfptrunc-vp.ll [new file with mode: 0644]