[llvm] [RISCV][GISel] Lower G_FCONSTANT to constant pool load without F or D. (PR #73034)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 09:04:30 PST 2023


================
@@ -273,7 +274,9 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
   getActionDefinitionsBuilder(G_IS_FPCLASS)
       .customIf(all(typeIs(0, s1), typeIsScalarFPArith(1, ST)));
 
-  getActionDefinitionsBuilder(G_FCONSTANT).legalIf(typeIsScalarFPArith(0, ST));
+  getActionDefinitionsBuilder(G_FCONSTANT)
+      .legalIf(typeIsScalarFPArith(0, ST))
+      .lowerFor({s32, s64});
----------------
michaelmaitland wrote:

How do we know that the `GFConstantMI.getOperand(1).getFPImm()` is in the constant pool?

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


More information about the llvm-commits mailing list