[llvm] [AMDGPU] Implement llvm.lrint intrinsic lowering (PR #98931)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 22:24:00 PDT 2024
================
@@ -786,13 +786,17 @@ void TargetLoweringBase::initActions() {
Expand);
// These library functions default to expand.
- setOperationAction({ISD::FCBRT, ISD::FLOG, ISD::FLOG2, ISD::FLOG10,
- ISD::FEXP, ISD::FEXP2, ISD::FEXP10, ISD::FFLOOR,
- ISD::FNEARBYINT, ISD::FCEIL, ISD::FRINT, ISD::FTRUNC,
- ISD::LROUND, ISD::LLROUND, ISD::LRINT, ISD::LLRINT,
- ISD::FROUNDEVEN, ISD::FTAN, ISD::FACOS, ISD::FASIN,
- ISD::FATAN, ISD::FCOSH, ISD::FSINH, ISD::FTANH},
- {MVT::f32, MVT::f64, MVT::f128}, Expand);
+ setOperationAction(
+ {ISD::FCBRT, ISD::FLOG, ISD::FLOG2, ISD::FLOG10, ISD::FEXP,
+ ISD::FEXP2, ISD::FEXP10, ISD::FFLOOR, ISD::FNEARBYINT, ISD::FCEIL,
+ ISD::FRINT, ISD::FTRUNC, ISD::LROUND, ISD::LLROUND, ISD::FROUNDEVEN,
+ ISD::FTAN, ISD::FACOS, ISD::FASIN, ISD::FATAN, ISD::FCOSH,
+ ISD::FSINH, ISD::FTANH},
+ {MVT::f32, MVT::f64, MVT::f128}, Expand);
+
+ // Unless the target expands, default LRINT to LibCall.
----------------
arsenm wrote:
This should be more a FIXME move all of those to libcall (although really this would make more sense to query RuntimeLibcalls for each of these to make the decision
https://github.com/llvm/llvm-project/pull/98931
More information about the llvm-commits
mailing list