Skip to content

Commit cdb5010

Browse files
authored
DAG: Avoid more uses of getLibcallName (#170402)
1 parent 8d6c5cd commit cdb5010

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4983,7 +4983,7 @@ static bool isDivRemLibcallAvailable(SDNode *Node, bool isSigned,
49834983
case MVT::i128: LC= isSigned ? RTLIB::SDIVREM_I128:RTLIB::UDIVREM_I128; break;
49844984
}
49854985

4986-
return TLI.getLibcallName(LC) != nullptr;
4986+
return TLI.getLibcallImpl(LC) != RTLIB::Unsupported;
49874987
}
49884988

49894989
/// Issue divrem if both quotient and remainder are needed.

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11121,7 +11121,8 @@ void TargetLowering::forceExpandWideMUL(SelectionDAG &DAG, const SDLoc &dl,
1112111121
else if (WideVT == MVT::i128)
1112211122
LC = RTLIB::MUL_I128;
1112311123

11124-
if (LC == RTLIB::UNKNOWN_LIBCALL || !getLibcallName(LC)) {
11124+
RTLIB::LibcallImpl LibcallImpl = getLibcallImpl(LC);
11125+
if (LibcallImpl == RTLIB::Unsupported) {
1112511126
forceExpandMultiply(DAG, dl, Signed, Lo, Hi, LHS, RHS);
1112611127
return;
1112711128
}

0 commit comments

Comments
 (0)