[RISCV] Support vector strict rounding operations.
authorYeting Kuo <yeting.kuo@sifive.com>
Mon, 17 Apr 2023 07:26:51 +0000 (15:26 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Thu, 27 Apr 2023 03:35:34 +0000 (11:35 +0800)
commit1855c0a82a2798276cafe765d825ac7875f5bf1d
treefd0bf6296a858d6cf6d4f629026f4a35725b4b14
parentb12a2fc4e82424bb940e9250e469abdcce3547f9
[RISCV] Support vector strict rounding operations.

The patch basically models custom lowering of base rounding operations to expand
rounding by coverting to ingter and coverting back to FP. The other one thing
the patch does is to covert sNan of the source to qNan.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D148519
15 files changed:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fceil-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/ffloor-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fceil-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ffloor-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fnearbyint-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fround-costrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-froundeven-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ftrunc-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fnearbyint-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fround-costrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/froundeven-constrained-sdnode.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/ftrunc-constrained-sdnode.ll [new file with mode: 0644]