[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:06: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:
Are there tests for the `scalarize` case? I don't think we should scalarize if we don't have test covereage for it. I would prefer legalizing to fail.
https://github.com/llvm/llvm-project/pull/93063
More information about the llvm-commits
mailing list