Skip to content

RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc targets #147656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/arsenm/riscv/start-moving-runtime-libcalls-tablegen
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions llvm/include/llvm/IR/RuntimeLibcalls.td
Original file line number Diff line number Diff line change
Expand Up @@ -1012,15 +1012,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"));
Expand Down Expand Up @@ -1841,6 +1847,7 @@ def PPCSystemLibrary
(sub DefaultRuntimeLibcallImpls, memcpy,
DefaultRuntimeLibcallImpls_f128),
__extendkftf2, __trunctfkf2,
DefaultRuntimeLibcallImpls_ppcf128,
LibmF128Libcalls, AIX32Calls, AIX64Calls,
AvailableIf<memcpy, isNotAIX>,
LibcallImpls<(add Int128RTLibcalls), isPPC64>)>;
Expand Down