[llvm] [RISCV][GISel] Add ZFA FP legalization and full tests for 9 insn (PR #118723)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 17:05:56 PST 2024


================
@@ -582,10 +582,13 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
       .libcallFor(ST.is64Bit(), {{s32, s128}, {s64, s128}});
 
   // FIXME: We can do custom inline expansion like SelectionDAG.
-  // FIXME: Legal with Zfa.
   getActionDefinitionsBuilder({G_FCEIL, G_FFLOOR, G_FRINT, G_FNEARBYINT,
                                G_INTRINSIC_TRUNC, G_INTRINSIC_ROUND,
-                               G_INTRINSIC_ROUNDEVEN})
+                               G_INTRINSIC_ROUNDEVEN, G_FMAXIMUM, G_FMINIMUM})
+        
+      .legalFor(ST.hasStdExtZfa() /*ST.hasStdExtF()*/, {s32})
+      .legalFor(ST.hasStdExtZfa() & ST.hasStdExtD()  , {s64})
----------------
mshockwave wrote:

please use &&

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


More information about the llvm-commits mailing list