-
Notifications
You must be signed in to change notification settings - Fork 14.3k
RuntimeLibcalls: Rename fminimum_num/fmaximum_num enums #143078
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
Merged
arsenm
merged 1 commit into
main
from
users/arsenm/runtime-libcalls/rename-fminimumnum-fmaximumnum-libcall-entries
Jun 6, 2025
Merged
RuntimeLibcalls: Rename fminimum_num/fmaximum_num enums #143078
arsenm
merged 1 commit into
main
from
users/arsenm/runtime-libcalls/rename-fminimumnum-fmaximumnum-libcall-entries
Jun 6, 2025
Conversation
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
Add the underscore to match the libm spelling
@llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-llvm-selectiondag Author: Matt Arsenault (arsenm) ChangesAdd the underscore to match the libm spelling Full diff: https://github.com/llvm/llvm-project/pull/143078.diff 4 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.def b/llvm/include/llvm/IR/RuntimeLibcalls.def
index cd8e9b598044c..4ddae8e48193f 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.def
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.def
@@ -317,16 +317,16 @@ HANDLE_LIBCALL(FMAXIMUM_F64, "fmaximum")
HANDLE_LIBCALL(FMAXIMUM_F80, "fmaximuml")
HANDLE_LIBCALL(FMAXIMUM_F128, "fmaximuml")
HANDLE_LIBCALL(FMAXIMUM_PPCF128, "fmaximum_numl")
-HANDLE_LIBCALL(FMINIMUMNUM_F32, "fminimum_numf")
-HANDLE_LIBCALL(FMINIMUMNUM_F64, "fminimum_num")
-HANDLE_LIBCALL(FMINIMUMNUM_F80, "fminimum_numl")
-HANDLE_LIBCALL(FMINIMUMNUM_F128, "fminimum_numl")
-HANDLE_LIBCALL(FMINIMUMNUM_PPCF128, "fminimum_numl")
-HANDLE_LIBCALL(FMAXIMUMNUM_F32, "fmaximum_numf")
-HANDLE_LIBCALL(FMAXIMUMNUM_F64, "fmaximum_num")
-HANDLE_LIBCALL(FMAXIMUMNUM_F80, "fmaximum_numl")
-HANDLE_LIBCALL(FMAXIMUMNUM_F128, "fmaximum_numl")
-HANDLE_LIBCALL(FMAXIMUMNUM_PPCF128, "fmaximum_numl")
+HANDLE_LIBCALL(FMINIMUM_NUM_F32, "fminimum_numf")
+HANDLE_LIBCALL(FMINIMUM_NUM_F64, "fminimum_num")
+HANDLE_LIBCALL(FMINIMUM_NUM_F80, "fminimum_numl")
+HANDLE_LIBCALL(FMINIMUM_NUM_F128, "fminimum_numl")
+HANDLE_LIBCALL(FMINIMUM_NUM_PPCF128, "fminimum_numl")
+HANDLE_LIBCALL(FMAXIMUM_NUM_F32, "fmaximum_numf")
+HANDLE_LIBCALL(FMAXIMUM_NUM_F64, "fmaximum_num")
+HANDLE_LIBCALL(FMAXIMUM_NUM_F80, "fmaximum_numl")
+HANDLE_LIBCALL(FMAXIMUM_NUM_F128, "fmaximum_numl")
+HANDLE_LIBCALL(FMAXIMUM_NUM_PPCF128, "fmaximum_numl")
HANDLE_LIBCALL(LROUND_F32, "lroundf")
HANDLE_LIBCALL(LROUND_F64, "lround")
HANDLE_LIBCALL(LROUND_F80, "lroundl")
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 5388183b0dced..5fe15e44c95bb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -4601,14 +4601,14 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
RTLIB::FMAX_PPCF128, Results);
break;
case ISD::FMINIMUMNUM:
- ExpandFPLibCall(Node, RTLIB::FMINIMUMNUM_F32, RTLIB::FMINIMUMNUM_F64,
- RTLIB::FMINIMUMNUM_F80, RTLIB::FMINIMUMNUM_F128,
- RTLIB::FMINIMUMNUM_PPCF128, Results);
+ ExpandFPLibCall(Node, RTLIB::FMINIMUM_NUM_F32, RTLIB::FMINIMUM_NUM_F64,
+ RTLIB::FMINIMUM_NUM_F80, RTLIB::FMINIMUM_NUM_F128,
+ RTLIB::FMINIMUM_NUM_PPCF128, Results);
break;
case ISD::FMAXIMUMNUM:
- ExpandFPLibCall(Node, RTLIB::FMAXIMUMNUM_F32, RTLIB::FMAXIMUMNUM_F64,
- RTLIB::FMAXIMUMNUM_F80, RTLIB::FMAXIMUMNUM_F128,
- RTLIB::FMAXIMUMNUM_PPCF128, Results);
+ ExpandFPLibCall(Node, RTLIB::FMAXIMUM_NUM_F32, RTLIB::FMAXIMUM_NUM_F64,
+ RTLIB::FMAXIMUM_NUM_F80, RTLIB::FMAXIMUM_NUM_F128,
+ RTLIB::FMAXIMUM_NUM_PPCF128, Results);
break;
case ISD::FSQRT:
case ISD::STRICT_FSQRT:
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 81f7c8059760e..7dfb43164be37 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -335,16 +335,16 @@ SDValue DAGTypeLegalizer::SoftenFloatRes_FMAXNUM(SDNode *N) {
SDValue DAGTypeLegalizer::SoftenFloatRes_FMINIMUMNUM(SDNode *N) {
return SoftenFloatRes_Binary(
- N, GetFPLibCall(N->getValueType(0), RTLIB::FMINIMUMNUM_F32,
- RTLIB::FMINIMUMNUM_F64, RTLIB::FMINIMUMNUM_F80,
- RTLIB::FMINIMUMNUM_F128, RTLIB::FMINIMUMNUM_PPCF128));
+ N, GetFPLibCall(N->getValueType(0), RTLIB::FMINIMUM_NUM_F32,
+ RTLIB::FMINIMUM_NUM_F64, RTLIB::FMINIMUM_NUM_F80,
+ RTLIB::FMINIMUM_NUM_F128, RTLIB::FMINIMUM_NUM_PPCF128));
}
SDValue DAGTypeLegalizer::SoftenFloatRes_FMAXIMUMNUM(SDNode *N) {
return SoftenFloatRes_Binary(
- N, GetFPLibCall(N->getValueType(0), RTLIB::FMAXIMUMNUM_F32,
- RTLIB::FMAXIMUMNUM_F64, RTLIB::FMAXIMUMNUM_F80,
- RTLIB::FMAXIMUMNUM_F128, RTLIB::FMAXIMUMNUM_PPCF128));
+ N, GetFPLibCall(N->getValueType(0), RTLIB::FMAXIMUM_NUM_F32,
+ RTLIB::FMAXIMUM_NUM_F64, RTLIB::FMAXIMUM_NUM_F80,
+ RTLIB::FMAXIMUM_NUM_F128, RTLIB::FMAXIMUM_NUM_PPCF128));
}
SDValue DAGTypeLegalizer::SoftenFloatRes_FMINIMUM(SDNode *N) {
@@ -1721,9 +1721,9 @@ void DAGTypeLegalizer::ExpandFloatRes_FMINIMUMNUM(SDNode *N, SDValue &Lo,
SDValue &Hi) {
ExpandFloatRes_Binary(
N,
- GetFPLibCall(N->getValueType(0), RTLIB::FMINIMUMNUM_F32,
- RTLIB::FMINIMUMNUM_F64, RTLIB::FMINIMUMNUM_F80,
- RTLIB::FMINIMUMNUM_F128, RTLIB::FMINIMUMNUM_PPCF128),
+ GetFPLibCall(N->getValueType(0), RTLIB::FMINIMUM_NUM_F32,
+ RTLIB::FMINIMUM_NUM_F64, RTLIB::FMINIMUM_NUM_F80,
+ RTLIB::FMINIMUM_NUM_F128, RTLIB::FMINIMUM_NUM_PPCF128),
Lo, Hi);
}
@@ -1731,9 +1731,9 @@ void DAGTypeLegalizer::ExpandFloatRes_FMAXIMUMNUM(SDNode *N, SDValue &Lo,
SDValue &Hi) {
ExpandFloatRes_Binary(
N,
- GetFPLibCall(N->getValueType(0), RTLIB::FMAXIMUMNUM_F32,
- RTLIB::FMAXIMUMNUM_F64, RTLIB::FMAXIMUMNUM_F80,
- RTLIB::FMAXIMUMNUM_F128, RTLIB::FMAXIMUMNUM_PPCF128),
+ GetFPLibCall(N->getValueType(0), RTLIB::FMAXIMUM_NUM_F32,
+ RTLIB::FMAXIMUM_NUM_F64, RTLIB::FMAXIMUM_NUM_F80,
+ RTLIB::FMAXIMUM_NUM_F128, RTLIB::FMAXIMUM_NUM_PPCF128),
Lo, Hi);
}
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index ca45cd4b7b13c..430166adb9e19 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -67,8 +67,8 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
setLibcallName(RTLIB::FMAX_F128, "fmaxf128");
setLibcallName(RTLIB::FMINIMUM_F128, "fminimumf128");
setLibcallName(RTLIB::FMAXIMUM_F128, "fmaximumf128");
- setLibcallName(RTLIB::FMINIMUMNUM_F128, "fminimum_numf128");
- setLibcallName(RTLIB::FMAXIMUMNUM_F128, "fmaximum_numf128");
+ setLibcallName(RTLIB::FMINIMUM_NUM_F128, "fminimum_numf128");
+ setLibcallName(RTLIB::FMAXIMUM_NUM_F128, "fmaximum_numf128");
setLibcallName(RTLIB::LROUND_F128, "lroundf128");
setLibcallName(RTLIB::LLROUND_F128, "llroundf128");
setLibcallName(RTLIB::LRINT_F128, "lrintf128");
|
wzssyqa
approved these changes
Jun 6, 2025
rorth
pushed a commit
to rorth/llvm-project
that referenced
this pull request
Jun 11, 2025
Add the underscore to match the libm spelling
DhruvSrivastavaX
pushed a commit
to DhruvSrivastavaX/lldb-for-aix
that referenced
this pull request
Jun 12, 2025
Add the underscore to match the libm spelling
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.
Add the underscore to match the libm spelling