-
Notifications
You must be signed in to change notification settings - Fork 14.5k
RuntimeLibcalls: Remove __muloti4 from default libcall set #148562
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
RuntimeLibcalls: Remove __muloti4 from default libcall set #148562
Conversation
@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
@@ -1036,7 +1041,7 @@ defvar Int128RTLibcalls = [ | |||
]; | |||
|
|||
// Only available in compiler-rt | |||
defvar CompilerRTOnlyInt128Libcalls = [ | |||
defvar CompilerRTOnlyInt64Libcalls = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the rename? This libcall works on 128 bit integers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for MULO_I64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, duh. Shouldn't it get dropped from the Int128RTLibcalls list directly above?
18ca551
to
19c269f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
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.