[RISCV] Combine FP_TO_INT to vfwcvt/fvncvt
authorLuke Lau <luke@igalia.com>
Thu, 19 Jan 2023 11:25:23 +0000 (11:25 +0000)
committerLuke Lau <luke@igalia.com>
Tue, 24 Jan 2023 09:44:57 +0000 (09:44 +0000)
commitf5a644719657c25bdb298c17374578d2e9202197
treee299dc775d7864238f17d73a1d154dff868298ff
parent8b1d86aedf13a22e283ee334304063febdaec9c7
[RISCV] Combine FP_TO_INT to vfwcvt/fvncvt

Adds new pseudo instructions to make sure that the fcvt instructions
have all rounding mode (RM) and unsigned (XU) variants across
single-width, widening and narrowing conversions.
And likewise, extends the VL patterns to accompany them. We don't add
new VL nodes for the widening/narrowing conversions though, instead we
just add specific patterns for vfcvts on those wider/narrower types.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D142102
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/double-round-conv.ll
llvm/test/CodeGen/RISCV/rvv/float-round-conv.ll
llvm/test/CodeGen/RISCV/rvv/half-round-conv.ll