[llvm] [SelectionDAG][RISCV] Operations with static rounding (PR #100999)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 04:45:59 PDT 2024
================
@@ -21427,6 +21432,23 @@ bool RISCVTargetLowering::preferScalarizeSplat(SDNode *N) const {
return true;
}
+int RISCVTargetLowering::getMachineRoundingMode(RoundingMode RM) const {
+ switch (RM) {
+ case RoundingMode::TowardZero:
+ return RISCVFPRndMode::RTZ;
----------------
spavloff wrote:
It now is implemented using special node for RISCV, which differ from the target-neutral FADD_ROUND an other by using target dependent encoding. Selection DAG first builds target-neutral nodes, then they are loweded to RISCV-specific nodes, which in turn are lowered by TableGen patterns.
https://github.com/llvm/llvm-project/pull/100999
More information about the llvm-commits
mailing list