[llvm-branch-commits] [llvm] RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc targets (PR #147656)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 8 22:46:04 PDT 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/147656
Filter out PPCF128 calls from the default set, and only add them
back to PPC.
>From 5b51c683685361162172f98fbe0dda31f7e067ad Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 9 Jul 2025 14:40:34 +0900
Subject: [PATCH] RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc
targets
Filter out PPCF128 calls from the default set, and only add them
back to PPC.
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index fabfaf89b5aa0..c9eda9110a9ef 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -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"));
@@ -1843,6 +1849,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-branch-commits
mailing list