diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td index b40b7f199f9e5..c22af429d1da1 100644 --- a/llvm/include/llvm/IR/RuntimeLibcalls.td +++ b/llvm/include/llvm/IR/RuntimeLibcalls.td @@ -149,6 +149,8 @@ foreach FPTy = ["F32", "F64", "F80", "F128", "PPCF128"] in { def ATAN_#FPTy : RuntimeLibcall; def ATAN2_#FPTy : RuntimeLibcall; def SINCOS_#FPTy : RuntimeLibcall; + def REMQUO_#FPTy : RuntimeLibcall; + def FDIM_#FPTy : RuntimeLibcall; } foreach FPTy = [ "F32", "F64" ] in { @@ -180,6 +182,12 @@ foreach FPTy = ["F32", "F64", "F80", "F128", "PPCF128"] in { def FREXP_#FPTy : RuntimeLibcall; def SINCOSPI_#FPTy : RuntimeLibcall; def MODF_#FPTy : RuntimeLibcall; + def NAN_#FPTy : RuntimeLibcall; + def NEXTTOWARD_#FPTy : RuntimeLibcall; + def REMAINDER_#FPTy : RuntimeLibcall; + def SCALBLN_#FPTy : RuntimeLibcall; + def SCALBN_#FPTy : RuntimeLibcall; + def TGAMMA_#FPTy : RuntimeLibcall; } defvar F32VectorSuffixes = ["V2F32", "V4F32", "V8F32", "V16F32", "NXV4F32"]; @@ -1034,6 +1042,38 @@ def modff : RuntimeLibcallImpl; def modf : RuntimeLibcallImpl; defm modfl : LibmLongDoubleLibCall; +def nanf : RuntimeLibcallImpl; +def nan : RuntimeLibcallImpl; +defm nanl : LibmLongDoubleLibCall; + +def nexttowardf : RuntimeLibcallImpl; +def nexttoward : RuntimeLibcallImpl; +defm nexttowardl : LibmLongDoubleLibCall; + +def remainderf : RuntimeLibcallImpl; +def remainder : RuntimeLibcallImpl; +defm remainderl : LibmLongDoubleLibCall; + +def remquof : RuntimeLibcallImpl; +def remquo : RuntimeLibcallImpl; +defm remquol : LibmLongDoubleLibCall; + +def fdimf : RuntimeLibcallImpl; +def fdim : RuntimeLibcallImpl; +defm fdiml : LibmLongDoubleLibCall; + +def scalbnf : RuntimeLibcallImpl; +def scalbn : RuntimeLibcallImpl; +defm scalbnl : LibmLongDoubleLibCall; + +def scalblnf : RuntimeLibcallImpl; +def scalbln : RuntimeLibcallImpl; +defm scalblnl : LibmLongDoubleLibCall; + +def tgammaf : RuntimeLibcallImpl; +def tgamma : RuntimeLibcallImpl; +defm tgammal : LibmLongDoubleLibCall; + // Floating point environment def fegetenv : RuntimeLibcallImpl; def fesetenv : RuntimeLibcallImpl; diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll index 4c8c829a59f3c..be8cae261c7bf 100644 --- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll +++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll @@ -16,9 +16,41 @@ define float @sinf(float %x) { ; CHECK: declare void @acosf(...) +; CHECK: declare void @fdim(...) +; CHECK: declare void @fdimf(...) +; CHECK: declare void @fdiml(...) + +; CHECK: declare void @nan(...) +; CHECK: declare void @nanf(...) +; CHECK: declare void @nanl(...) + +; CHECK: declare void @nexttoward(...) +; CHECK: declare void @nexttowardf(...) +; CHECK: declare void @nexttowardl(...) + +; CHECK: declare void @remainder(...) +; CHECK: declare void @remainderf(...) +; CHECK: declare void @remainderl(...) + +; CHECK: declare void @remquo(...) +; CHECK: declare void @remquof(...) +; CHECK: declare void @remquol(...) + +; CHECK: declare void @scalbln(...) +; CHECK: declare void @scalblnf(...) +; CHECK: declare void @scalblnl(...) + +; CHECK: declare void @scalbn(...) +; CHECK: declare void @scalbnf(...) +; CHECK: declare void @scalbnl(...) + ; CHECK: declare nofpclass(ninf nsub nnorm) double @sqrt(double) [[SQRT_ATTRS:#[0-9]+]] ; CHECK: declare nofpclass(ninf nsub nnorm) float @sqrtf(float) [[SQRT_ATTRS:#[0-9]+]] +; CHECK: declare void @tgamma(...) +; CHECK: declare void @tgammaf(...) +; CHECK: declare void @tgammal(...) + ; CHECK: declare void @truncl(...)