[llvm] cdb5010 - DAG: Avoid more uses of getLibcallName (#170402)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 10:01:09 PST 2025
Author: Matt Arsenault
Date: 2025-12-03T13:01:04-05:00
New Revision: cdb501064f35dbe5a1d49721daf59eca261057e9
URL: https://github.com/llvm/llvm-project/commit/cdb501064f35dbe5a1d49721daf59eca261057e9
DIFF: https://github.com/llvm/llvm-project/commit/cdb501064f35dbe5a1d49721daf59eca261057e9.diff
LOG: DAG: Avoid more uses of getLibcallName (#170402)
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 70950084ee6b7..0e52f0516b09a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4983,7 +4983,7 @@ static bool isDivRemLibcallAvailable(SDNode *Node, bool isSigned,
case MVT::i128: LC= isSigned ? RTLIB::SDIVREM_I128:RTLIB::UDIVREM_I128; break;
}
- return TLI.getLibcallName(LC) != nullptr;
+ return TLI.getLibcallImpl(LC) != RTLIB::Unsupported;
}
/// Issue divrem if both quotient and remainder are needed.
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 3564cbebed5c2..0ba8816bf1e82 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -11121,7 +11121,8 @@ void TargetLowering::forceExpandWideMUL(SelectionDAG &DAG, const SDLoc &dl,
else if (WideVT == MVT::i128)
LC = RTLIB::MUL_I128;
- if (LC == RTLIB::UNKNOWN_LIBCALL || !getLibcallName(LC)) {
+ RTLIB::LibcallImpl LibcallImpl = getLibcallImpl(LC);
+ if (LibcallImpl == RTLIB::Unsupported) {
forceExpandMultiply(DAG, dl, Signed, Lo, Hi, LHS, RHS);
return;
}
More information about the llvm-commits
mailing list