[llvm] CodeGen: Fix libcall names for exp10 on the various darwins (PR #92520)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 11:54:02 PDT 2024


================
@@ -227,6 +227,34 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
                               CallingConv::ARM_AAPCS_VFP);
       }
     }
+
+    switch (TT.getOS()) {
+    case Triple::MacOSX:
+      if (TT.isMacOSXVersionLT(10, 9)) {
+        setLibcallName(RTLIB::EXP10_F32, nullptr);
+        setLibcallName(RTLIB::EXP10_F64, nullptr);
+      } else {
+        setLibcallName(RTLIB::EXP10_F32, "__exp10f");
+        setLibcallName(RTLIB::EXP10_F64, "__exp10");
+      }
+      break;
+    case Triple::IOS:
+    case Triple::TvOS:
+    case Triple::WatchOS:
+    case Triple::XROS:
+      if (!TT.isWatchOS() &&
+          (TT.isOSVersionLT(7, 0) || (TT.isOSVersionLT(9, 0) && TT.isX86()))) {
----------------
arsenm wrote:

These are copied verbatim from what TargetLibraryInfo does; I'm not really looking to improve on this here now 

https://github.com/llvm/llvm-project/pull/92520


More information about the llvm-commits mailing list