[llvm] [RISCV][GISel] Add support for G_IS_FPCLASS in F and D extensions (PR #72000)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 10:49:26 PST 2023
================
@@ -948,6 +952,56 @@ bool RISCVInstructionSelector::selectFPCompare(MachineInstr &MI,
return true;
}
+bool RISCVInstructionSelector::selectIsFPClass(MachineInstr &MI,
+ MachineIRBuilder &MIB,
+ MachineRegisterInfo &MRI) const {
+ Register GISFPCLASS = MI.getOperand(0).getReg();
+ Register Src = MI.getOperand(1).getReg();
+ const MachineOperand &ImmOp = MI.getOperand(2);
+ const unsigned XLen = STI.getXLen();
+ unsigned NewOpc = MRI.getType(Src).getSizeInBits() == 32 ? RISCV::FCLASS_S
+ : RISCV::FCLASS_D;
+
+ // Turn LLVM IR's floating point classes to that in RISCV,
----------------
topperc wrote:
RISCV -> RISC-V.
https://github.com/llvm/llvm-project/pull/72000
More information about the llvm-commits
mailing list