[llvm] [RISCV][VLOPT] Add vector fp-conversion instruction to isSupportedInstr (PR #122033)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 06:50:23 PST 2025


================
@@ -961,7 +961,32 @@ static bool isSupportedInstr(const MachineInstr &MI) {
   case RISCV::VMSOF_M:
   case RISCV::VIOTA_M:
   case RISCV::VID_V:
+  // Single-Width Floating-Point/Integer Type-Convert Instructions
+  case RISCV::VFCVT_XU_F_V:
+  case RISCV::VFCVT_X_F_V:
+  case RISCV::VFCVT_RTZ_XU_F_V:
+  case RISCV::VFCVT_RTZ_X_F_V:
+  case RISCV::VFCVT_F_XU_V:
+  case RISCV::VFCVT_F_X_V:
+  // Widening Floating-Point/Integer Type-Convert Instructions
+  case RISCV::VFWCVT_XU_F_V:
+  case RISCV::VFWCVT_X_F_V:
+  case RISCV::VFWCVT_RTZ_XU_F_V:
+  case RISCV::VFWCVT_RTZ_X_F_V:
+  case RISCV::VFWCVT_F_XU_V:
+  case RISCV::VFWCVT_F_X_V:
+  case RISCV::VFWCVT_F_F_V:
----------------
lukel97 wrote:

In a later PR we could also handle the zvfhmin instructions i.e. VFWCVTBF16_F_F/VFNCVTBF16_F_F

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


More information about the llvm-commits mailing list