Skip to content

Commit e0d9420

Browse files
committed
RuntimeLibcalls: Avoid adding ppcf128 calls to non-ppc targets
Filter out PPCF128 calls from the default set, and only add them back to PPC.
1 parent ba16f00 commit e0d9420

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
@@ -1012,15 +1012,21 @@ defvar CompilerRTOnlyInt128Libcalls = [
10121012
__mulodi4
10131013
];
10141014

1015-
defvar DefaultRuntimeLibcallImpls =
1016-
!listremove(!listremove(AllDefaultRuntimeLibcallImpls,
1017-
Int128RTLibcalls),
1018-
CompilerRTOnlyInt128Libcalls);
1015+
defvar DefaultRuntimeLibcallImpls_ppcf128 =
1016+
!filter(entry, AllDefaultRuntimeLibcallImpls,
1017+
!match(!cast<string>(entry.Provides), "PPCF128"));
10191018

10201019
defvar DefaultRuntimeLibcallImpls_f128 =
1021-
!filter(entry, DefaultRuntimeLibcallImpls,
1020+
!filter(entry, AllDefaultRuntimeLibcallImpls,
10221021
!match(!cast<string>(entry.Provides), "_F128"));
10231022

1023+
defvar DefaultRuntimeLibcallImpls =
1024+
!listremove(
1025+
!listremove(
1026+
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1027+
CompilerRTOnlyInt128Libcalls),
1028+
DefaultRuntimeLibcallImpls_ppcf128);
1029+
10241030
defvar DefaultRuntimeLibcallImpls_atomic =
10251031
!filter(entry, DefaultRuntimeLibcallImpls,
10261032
!match(!cast<string>(entry.Provides), "ATOMIC"));
@@ -1841,6 +1847,7 @@ def PPCSystemLibrary
18411847
(sub DefaultRuntimeLibcallImpls, memcpy,
18421848
DefaultRuntimeLibcallImpls_f128),
18431849
__extendkftf2, __trunctfkf2,
1850+
DefaultRuntimeLibcallImpls_ppcf128,
18441851
LibmF128Libcalls, AIX32Calls, AIX64Calls,
18451852
AvailableIf<memcpy, isNotAIX>,
18461853
LibcallImpls<(add Int128RTLibcalls), isPPC64>)>;

0 commit comments

Comments
 (0)