[RISCV] Add lowering for vp.fptosi and vp.sitofp.
authorCraig Topper <craig.topper@sifive.com>
Mon, 28 Mar 2022 15:52:15 +0000 (08:52 -0700)
committerCraig Topper <craig.topper@sifive.com>
Mon, 28 Mar 2022 18:06:41 +0000 (11:06 -0700)
commitcfe533da05bc6084fd2d573b6a8f3269a007958b
treedaae8547fc0b54690a45956f0c978e5049b3ca8e
parent1db59dc8e28819b1960dae8e7fe6d79ad4b03340
[RISCV] Add lowering for vp.fptosi and vp.sitofp.

This as an alternative version of D120641. Starting from the code here
https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/raw/EPI/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
but with some modifications to how the interim types are calculated,
and adding support for f16.

Still need to add fptosi for mask vectors.

Lots of masked isel patterns added so we can pass the mask through
the type changes.

Reviewed By: frasercrmck, arcbbb

Differential Revision: https://reviews.llvm.org/D122512
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fptosi-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-sitofp-vp-mask.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-sitofp-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/vfptosi-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/vsitofp-vp-mask.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/vsitofp-vp.ll [new file with mode: 0644]