Skip to content

Commit 0537f17

Browse files
authored
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.
1 parent d92e6f0 commit 0537f17

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,15 +1040,21 @@ defvar CompilerRTOnlyInt128Libcalls = [
10401040
__mulodi4
10411041
];
10421042

1043-
defvar DefaultRuntimeLibcallImpls =
1044-
!listremove(!listremove(AllDefaultRuntimeLibcallImpls,
1045-
Int128RTLibcalls),
1046-
CompilerRTOnlyInt128Libcalls);
1043+
defvar DefaultRuntimeLibcallImpls_ppcf128 =
1044+
!filter(entry, AllDefaultRuntimeLibcallImpls,
1045+
!match(!cast<string>(entry.Provides), "PPCF128"));
10471046

10481047
defvar DefaultRuntimeLibcallImpls_f128 =
1049-
!filter(entry, DefaultRuntimeLibcallImpls,
1048+
!filter(entry, AllDefaultRuntimeLibcallImpls,
10501049
!match(!cast<string>(entry.Provides), "_F128"));
10511050

1051+
defvar DefaultRuntimeLibcallImpls =
1052+
!listremove(
1053+
!listremove(
1054+
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1055+
CompilerRTOnlyInt128Libcalls),
1056+
DefaultRuntimeLibcallImpls_ppcf128);
1057+
10521058
defvar DefaultRuntimeLibcallImpls_atomic =
10531059
!filter(entry, DefaultRuntimeLibcallImpls,
10541060
!match(!cast<string>(entry.Provides), "ATOMIC"));
@@ -1900,6 +1906,7 @@ def PPCSystemLibrary
19001906
(sub DefaultRuntimeLibcallImpls, memcpy,
19011907
DefaultRuntimeLibcallImpls_f128),
19021908
__extendkftf2, __trunctfkf2,
1909+
DefaultRuntimeLibcallImpls_ppcf128,
19031910
LibmF128Libcalls, AIX32Calls, AIX64Calls,
19041911
AvailableIf<memcpy, isNotAIX>,
19051912
LibcallImpls<(add Int128RTLibcalls), isPPC64>)>;

0 commit comments

Comments
 (0)