[llvm] 0537f17 - RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc targets (#147656)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 12 18:55:07 PDT 2025
Author: Matt Arsenault
Date: 2025-07-13T10:55:04+09:00
New Revision: 0537f17dfc2e5989ff9d3ee2fe9999d360ed5de6
URL: https://github.com/llvm/llvm-project/commit/0537f17dfc2e5989ff9d3ee2fe9999d360ed5de6
DIFF: https://github.com/llvm/llvm-project/commit/0537f17dfc2e5989ff9d3ee2fe9999d360ed5de6.diff
LOG: RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc targets (#147656)
Filter out PPCF128 calls from the default set, and only add them
back to PPC.
Added:
Modified:
llvm/include/llvm/IR/RuntimeLibcalls.td
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 9a8dd66b7a1ad..def156b5cda11 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1040,15 +1040,21 @@ defvar CompilerRTOnlyInt128Libcalls = [
__mulodi4
];
-defvar DefaultRuntimeLibcallImpls =
- !listremove(!listremove(AllDefaultRuntimeLibcallImpls,
- Int128RTLibcalls),
- CompilerRTOnlyInt128Libcalls);
+defvar DefaultRuntimeLibcallImpls_ppcf128 =
+ !filter(entry, AllDefaultRuntimeLibcallImpls,
+ !match(!cast<string>(entry.Provides), "PPCF128"));
defvar DefaultRuntimeLibcallImpls_f128 =
- !filter(entry, DefaultRuntimeLibcallImpls,
+ !filter(entry, AllDefaultRuntimeLibcallImpls,
!match(!cast<string>(entry.Provides), "_F128"));
+defvar DefaultRuntimeLibcallImpls =
+ !listremove(
+ !listremove(
+ !listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
+ CompilerRTOnlyInt128Libcalls),
+ DefaultRuntimeLibcallImpls_ppcf128);
+
defvar DefaultRuntimeLibcallImpls_atomic =
!filter(entry, DefaultRuntimeLibcallImpls,
!match(!cast<string>(entry.Provides), "ATOMIC"));
@@ -1900,6 +1906,7 @@ def PPCSystemLibrary
(sub DefaultRuntimeLibcallImpls, memcpy,
DefaultRuntimeLibcallImpls_f128),
__extendkftf2, __trunctfkf2,
+ DefaultRuntimeLibcallImpls_ppcf128,
LibmF128Libcalls, AIX32Calls, AIX64Calls,
AvailableIf<memcpy, isNotAIX>,
LibcallImpls<(add Int128RTLibcalls), isPPC64>)>;
More information about the llvm-commits
mailing list