[RISCV] Support fixed-length vector i2fp/fp2i conversions
authorFraser Cormack <fraser@codeplay.com>
Wed, 24 Feb 2021 10:18:28 +0000 (10:18 +0000)
committerFraser Cormack <fraser@codeplay.com>
Thu, 25 Feb 2021 13:47:58 +0000 (13:47 +0000)
commit02f435db0b5f91986a7408ff8a1f1fda4918bde0
tree46cece86462254700eb812759dc728f84eb7ef85
parentad14ccc8c22e1480db7bfc1a176311e6f572c588
[RISCV] Support fixed-length vector i2fp/fp2i conversions

This patch extends the support for scalable-vector int->fp and fp->int
conversions by additionally handling fixed-length vectors.

The existing scalable-vector lowering re-expresses widening/narrowing by
x4+ conversions as standard nodes. The fixed-length vector support slots
in at "the end" of this process by lowering the now equally-sized and
widening/narrowing by x2 nodes to our custom VL versions.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97374
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-fp2i.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll [new file with mode: 0644]