You can use XLenVT instead of picking i64/i32.
Rename IntTy to XLenVT to match what most of the RISCV back does.
Use RISCVSysReg::lookupSysRegByName("FRM")->Encoding it's not common enough to justify having the encoding in 2 places.
Is this code reachable? This would require setOperaction(ISD::FLT_ROUNDS_, MVT::i32, Custom) when Subtarget.is64Bit() is false.
It's also the default behavior for the target independent type legalizer.
Can you use RISCVFPRndMode from lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h