[VP][RISCV] Add vp.nearbyint and RISC-V support.
authorYeting Kuo <yeting.kuo@sifive.com>
Wed, 9 Nov 2022 01:40:24 +0000 (09:40 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Wed, 16 Nov 2022 06:05:35 +0000 (14:05 +0800)
commited9638c44bc0c95314694fb878b21006e6c87510
treeb19dd729fcfa562986d0625cc3e8d95eafcdfd75
parentcb01befda5479b0368d40582f046eec44fda3cec
[VP][RISCV] Add vp.nearbyint and RISC-V support.

nearbyint has the property to execute without exception.
For not modifying fflags, the patch added new machine opcode
PseudoVFROUND_NOEXCEPT_V that expands vfcvt.x.f.v and vfcvt.f.x.v between a pair
of frflags and fsflags.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D137685
13 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/VPIntrinsics.def
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
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/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/fround.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-nearbyint-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/nearbyint-vp.ll [new file with mode: 0644]
llvm/unittests/IR/VPIntrinsicTest.cpp