Skip to content

Commit

Permalink
[LoongArch] Disable mulodi4 and muloti4 libcalls (#73199)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
heiher committed Nov 23, 2023
1 parent 0d1b220 commit 0d9f557
Show file tree
Hide file tree
Showing 2 changed files with 397 additions and 71 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,13 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,

// Set libcalls.
setLibcallName(RTLIB::MUL_I128, nullptr);
// The MULO libcall is not part of libgcc, only compiler-rt.
setLibcallName(RTLIB::MULO_I64, nullptr);
}

// The MULO libcall is not part of libgcc, only compiler-rt.
setLibcallName(RTLIB::MULO_I128, nullptr);

setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Custom);

static const ISD::CondCode FPCCToExpand[] = {
Expand Down

0 comments on commit 0d9f557

Please sign in to comment.