Skip to content

RuntimeLibcalls: Avoid adding f80 calls to default set #147658

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/runtime-libcalls/only-add-ppcf128-calls-ppc
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
21 changes: 21 additions & 0 deletions llvm/include/llvm/IR/RuntimeLibcalls.td
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,10 @@ defvar CompilerRTOnlyInt128Libcalls = [
__mulodi4
];

defvar DefaultRuntimeLibcallImpls_f80 =
!filter(entry, AllDefaultRuntimeLibcallImpls,
!match(!cast<string>(entry.Provides), "F80"));

defvar DefaultRuntimeLibcallImpls_ppcf128 =
!filter(entry, AllDefaultRuntimeLibcallImpls,
!match(!cast<string>(entry.Provides), "PPCF128"));
Expand All @@ -1021,10 +1025,12 @@ defvar DefaultRuntimeLibcallImpls_f128 =
!match(!cast<string>(entry.Provides), "_F128"));

defvar DefaultRuntimeLibcallImpls =
!listremove(
!listremove(
!listremove(
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
CompilerRTOnlyInt128Libcalls),
DefaultRuntimeLibcallImpls_f80),
DefaultRuntimeLibcallImpls_ppcf128);

defvar DefaultRuntimeLibcallImpls_atomic =
Expand Down Expand Up @@ -1927,6 +1933,21 @@ def _allrem : RuntimeLibcallImpl<SREM_I64>;
def _aullrem : RuntimeLibcallImpl<UREM_I64>;
def _allmul : RuntimeLibcallImpl<MUL_I64>;

//===----------------------------------------------------------------------===//
// X86 Runtime Libcalls
//===----------------------------------------------------------------------===//

def isX86_32 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86">;
def isX86_64 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86_64">;

def X86_32SystemLibrary
: SystemRuntimeLibrary<isX86_32,
(add DefaultLibcallImpls32, DefaultRuntimeLibcallImpls_f80)>;

def X86_64SystemLibrary
: SystemRuntimeLibrary<isX86_64,
(add DefaultLibcallImpls64, DefaultRuntimeLibcallImpls_f80)>;

//===----------------------------------------------------------------------===//
// XCore Runtime Libcalls
//===----------------------------------------------------------------------===//
Expand Down