[llvm] [RISCV][GISel] Add ZFA FP legalization and full tests for 9 insn (PR #118723)
Luke Quinn via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 17:31:54 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})
----------------
lquinn2015 wrote:
No we do not and you also cannot legalize these via libcall either it seems that is a defect :/
was trying with this snippet, I suppose this change needs more work. I will shift this to a draft
llc mtriple=riscv32 -mattr+f -global-isel %s
```
define float @fmaximum(float %a, float %b) {
%c = call float @llvm.maximum.f32(float %a, float %b)
ret float %c
}
```
https://github.com/llvm/llvm-project/pull/118723
More information about the llvm-commits
mailing list