Skip to content

Commit 50dfb07

Browse files
committed
[RISCV] Support f32/f64 libcalls for sin/cos/pow/log/log2/log10/exp/exp2
Test cases copied from SelectionDAG.
1 parent 6c7b988 commit 50dfb07

File tree

4 files changed

+852
-28
lines changed

4 files changed

+852
-28
lines changed

llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,10 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
574574
G_INTRINSIC_ROUNDEVEN})
575575
.libcallFor({s32, s64});
576576

577+
getActionDefinitionsBuilder(
578+
{G_FCOS, G_FSIN, G_FPOW, G_FLOG, G_FLOG2, G_FLOG10, G_FEXP, G_FEXP2})
579+
.libcallFor({s32, s64});
580+
577581
getActionDefinitionsBuilder(G_VASTART).customFor({p0});
578582

579583
// va_list must be a pointer, but most sized types are pretty easy to handle

0 commit comments

Comments
 (0)