Skip to content

Commit 0d9f557

Browse files
authored
[LoongArch] Disable mulodi4 and muloti4 libcalls (#73199)
This library function only exists in compiler-rt not libgcc. So this would fail to link unless we were linking with compiler-rt. Fixes ClangBuiltLinux/linux#1958
1 parent 0d1b220 commit 0d9f557

File tree

2 files changed

+397
-71
lines changed

2 files changed

+397
-71
lines changed

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,13 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
152152

153153
// Set libcalls.
154154
setLibcallName(RTLIB::MUL_I128, nullptr);
155+
// The MULO libcall is not part of libgcc, only compiler-rt.
156+
setLibcallName(RTLIB::MULO_I64, nullptr);
155157
}
156158

159+
// The MULO libcall is not part of libgcc, only compiler-rt.
160+
setLibcallName(RTLIB::MULO_I128, nullptr);
161+
157162
setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Custom);
158163

159164
static const ISD::CondCode FPCCToExpand[] = {

0 commit comments

Comments
 (0)