[llvm-branch-commits] [llvm] RuntimeLibcalls: Add libcall entries for sleef and armpl modf functions (PR #166985)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 10 09:13:21 PST 2025
================
@@ -197,6 +201,55 @@ RuntimeLibcallsInfo::getFunctionTy(LLVMContext &Ctx, const Triple &TT,
fcNegNormal));
return {FuncTy, Attrs};
}
+ case RTLIB::impl__ZGVnN2vl8_modf:
+ case RTLIB::impl__ZGVnN4vl4_modff:
+ case RTLIB::impl__ZGVsNxvl8_modf:
+ case RTLIB::impl__ZGVsNxvl4_modff:
+ case RTLIB::impl_armpl_vmodfq_f64:
+ case RTLIB::impl_armpl_vmodfq_f32:
+ case RTLIB::impl_armpl_svmodf_f64_x:
+ case RTLIB::impl_armpl_svmodf_f32_x: {
+ AttrBuilder FuncAttrBuilder(Ctx);
+
+ bool IsF32 = LibcallImpl == RTLIB::impl__ZGVnN4vl4_modff ||
+ LibcallImpl == RTLIB::impl__ZGVsNxvl4_modff ||
+ LibcallImpl == RTLIB::impl_armpl_vmodfq_f32 ||
+ LibcallImpl == RTLIB::impl_armpl_svmodf_f32_x;
+
+ bool IsScalable = LibcallImpl == RTLIB::impl__ZGVsNxvl8_modf ||
+ LibcallImpl == RTLIB::impl__ZGVsNxvl4_modff ||
+ LibcallImpl == RTLIB::impl_armpl_svmodf_f64_x ||
+ LibcallImpl == RTLIB::impl_armpl_svmodf_f32_x;
+
+ Type *ScalarTy = IsF32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx);
+ unsigned EC = IsF32 ? 4 : 2;
----------------
ilovepi wrote:
This is the element count, right? was trying to find on sleef.org where these numbers come from, but I didn't see anything obvious documenting these in the library reference and other docs I skimmed. Are these derived from some other place, like a documented LLVM convention or HW constraint?
https://github.com/llvm/llvm-project/pull/166985
More information about the llvm-branch-commits
mailing list