[llvm] [SelectionDAG][RISCV] Operations with static rounding (PR #100999)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 05:13:25 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;
----------------
arsenm wrote:

Instead of introducing this hook, can these just be handled in selection values? It's only an encoding value question 

https://github.com/llvm/llvm-project/pull/100999


More information about the llvm-commits mailing list