[llvm] [GISel][RISCV] Legalize `G_FREM` to use fmod (PR #93063)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 10:07:57 PDT 2024


================
@@ -372,6 +372,11 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
                                G_FABS, G_FSQRT, G_FMAXNUM, G_FMINNUM})
       .legalIf(typeIsScalarFPArith(0, ST));
 
+  getActionDefinitionsBuilder(G_FREM)
+      .libcallFor({s32, s64})
+      .minScalar(0, s32)
+      .scalarize(0);
----------------
michaelmaitland wrote:

I see you call out that you did not add tests for it in the description. I am questioning whether we should drop that line if we are not going to test for it.

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


More information about the llvm-commits mailing list