RuntimeLibcalls: Remove __muloti4 from default libcall set#148562
Merged
arsenm merged 2 commits intoJul 14, 2025
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
|
@llvm/pr-subscribers-llvm-ir Author: Matt Arsenault (arsenm) ChangesThe current logic says it's only available on wasm, so only Full diff: https://github.com/llvm/llvm-project/pull/148562.diff 1 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 9781bef8e37b6..53eea97bf1ea9 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -459,7 +459,6 @@ def __multi3 : RuntimeLibcallImpl<MUL_I128>;
def __mulosi4 : RuntimeLibcallImpl<MULO_I32>;
def __mulodi4 : RuntimeLibcallImpl<MULO_I64>;
-def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
def __divqi3 : RuntimeLibcallImpl<SDIV_I8>;
def __divhi3 : RuntimeLibcallImpl<SDIV_I16>;
@@ -935,6 +934,12 @@ def calloc : RuntimeLibcallImpl<CALLOC>;
} // End let IsDefault = true
+//--------------------------------------------------------------------
+// compiler-rt, not available for most architectures
+//--------------------------------------------------------------------
+
+def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
+
//--------------------------------------------------------------------
// Define implementation other libcalls
//--------------------------------------------------------------------
@@ -1036,7 +1041,7 @@ defvar Int128RTLibcalls = [
];
// Only available in compiler-rt
-defvar CompilerRTOnlyInt128Libcalls = [
+defvar CompilerRTOnlyInt64Libcalls = [
__mulodi4
];
@@ -1057,7 +1062,7 @@ defvar DefaultRuntimeLibcallImpls =
!listremove(
!listremove(
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
- CompilerRTOnlyInt128Libcalls),
+ CompilerRTOnlyInt64Libcalls),
DefaultRuntimeLibcallImpls_f80),
DefaultRuntimeLibcallImpls_ppcf128);
@@ -2130,5 +2135,5 @@ def isWasm : RuntimeLibcallPredicate<"TT.isWasm()">;
def WasmSystemLibrary
: SystemRuntimeLibrary<isWasm,
(add DefaultRuntimeLibcallImpls, Int128RTLibcalls,
- CompilerRTOnlyInt128Libcalls,
+ CompilerRTOnlyInt64Libcalls, __muloti4,
emscripten_return_address)>;
|
4b71045 to
18ca551
Compare
nikic
reviewed
Jul 14, 2025
|
|
||
| // Only available in compiler-rt | ||
| defvar CompilerRTOnlyInt128Libcalls = [ | ||
| defvar CompilerRTOnlyInt64Libcalls = [ |
Contributor
There was a problem hiding this comment.
Why the rename? This libcall works on 128 bit integers.
Contributor
There was a problem hiding this comment.
Oh, duh. Shouldn't it get dropped from the Int128RTLibcalls list directly above?
18ca551 to
19c269f
Compare
Contributor
Author
The current logic says it's only available on wasm, so only explicitly add it there. Also fix a misnomer in the compiler-rt call list.
19c269f to
953c476
Compare
This was referenced Jul 15, 2025
This was referenced Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The current logic says it's only available on wasm, so only
explicitly add it there. Also fix a misnomer in the compiler-rt
call list.