-
Notifications
You must be signed in to change notification settings - Fork 14.7k
ARM: Remove idiv runtime call aliases #152098
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
Conversation
@llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-backend-arm Author: Matt Arsenault (arsenm) ChangesReally only the i32 variants exist. We don't need synthetic Full diff: https://github.com/llvm/llvm-project/pull/152098.diff 2 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 384b7f29b9073..8c53f12cf09ac 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1399,13 +1399,9 @@ def __aeabi_lasr : RuntimeLibcallImpl<SRA_I64>; // CallingConv::ARM_AAPCS
// Integer division functions
// RTABI chapter 4.3.1
-def __aeabi_idiv__i8 : RuntimeLibcallImpl<SDIV_I8, "__aeabi_idiv">; // CallingConv::ARM_AAPCS
-def __aeabi_idiv__i16 : RuntimeLibcallImpl<SDIV_I16, "__aeabi_idiv">; // CallingConv::ARM_AAPCS
-def __aeabi_idiv__i32 : RuntimeLibcallImpl<SDIV_I32, "__aeabi_idiv">; // CallingConv::ARM_AAPCS
+def __aeabi_idiv : RuntimeLibcallImpl<SDIV_I32, "__aeabi_idiv">; // CallingConv::ARM_AAPCS
def __aeabi_ldivmod : RuntimeLibcallImpl<SDIVREM_I64>; // CallingConv::ARM_AAPCS
-def __aeabi_uidiv__i8 : RuntimeLibcallImpl<UDIV_I8, "__aeabi_uidiv">; // CallingConv::ARM_AAPCS
-def __aeabi_uidiv__i16 : RuntimeLibcallImpl<UDIV_I16, "__aeabi_uidiv">; // CallingConv::ARM_AAPCS
-def __aeabi_uidiv__i32 : RuntimeLibcallImpl<UDIV_I32, "__aeabi_uidiv">; // CallingConv::ARM_AAPCS
+def __aeabi_uidiv : RuntimeLibcallImpl<UDIV_I32, "__aeabi_uidiv">; // CallingConv::ARM_AAPCS
def __aeabi_uldivmod : RuntimeLibcallImpl<UDIVREM_I64>; // CallingConv::ARM_AAPCS
def __aeabi_idivmod : RuntimeLibcallImpl<SDIVREM_I32>; // CallingConv::ARM_AAPCS
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index b6e2cac5f7b04..a8e6c7938cf54 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -47,11 +47,9 @@ static void setARMLibcallNames(RuntimeLibcallsInfo &Info, const Triple &TT,
RTLIB::__aeabi_ui2f, RTLIB::__aeabi_l2f,
RTLIB::__aeabi_ul2f, RTLIB::__aeabi_lmul,
RTLIB::__aeabi_llsl, RTLIB::__aeabi_llsr,
- RTLIB::__aeabi_lasr, RTLIB::__aeabi_idiv__i8,
- RTLIB::__aeabi_idiv__i16, RTLIB::__aeabi_idiv__i32,
+ RTLIB::__aeabi_lasr, RTLIB::__aeabi_idiv,
RTLIB::__aeabi_idivmod, RTLIB::__aeabi_uidivmod,
- RTLIB::__aeabi_ldivmod, RTLIB::__aeabi_uidiv__i8,
- RTLIB::__aeabi_uidiv__i16, RTLIB::__aeabi_uidiv__i32,
+ RTLIB::__aeabi_ldivmod, RTLIB::__aeabi_uidiv,
RTLIB::__aeabi_uldivmod, RTLIB::__aeabi_f2h,
RTLIB::__aeabi_d2h, RTLIB::__aeabi_h2f,
RTLIB::__aeabi_memcpy, RTLIB::__aeabi_memmove,
|
Really only the i32 variants exist. We don't need synthetic aliases for illegal types which will be promoted.
a294d5d
to
fea1584
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, assuming there is test coverage for the sub-word divisions somewhere...
Really only the i32 variants exist. We don't need synthetic
aliases for illegal types which will be promoted.