[PATCH] D141836: [AArch64] Disable __muloti4 libcalls for AArch64

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 10:11:00 PST 2023


rengolin added a subscriber: echristo.
rengolin added a comment.

In D141836#4073296 <https://reviews.llvm.org/D141836#4073296>, @sebastianpoeplau wrote:

>> From reading the thread on https://github.com/llvm/llvm-project/issues/16778 (which is closed, although the issue doesn't seem resolved), this is a stop-gap for toolchains that don't include an implementation for `__muloti4`. An implementation seems to exist in compiler-rt, but compiler-rt isn't linked with by default. It seems unfortunate that there is no way to still emit a call to `__muloti4` when we do link with compiler-rt, but from reading that thread there is currently no way to tell LLVM that an implementation of `__muloti4` is available.
>
> That's my understanding as well.

Every few years I come to this issue via bugs or reviews. I am shocked that this is still an issue today...

This isn't by far a good solution, but it will work around the "original" problem, just not the "actual" problem.

I don't mind this going in as is, but I'll let @nickdesaulniers approve to be sure I'm not missing anything.

@echristo FYI



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:607
+  // The MULO libcall is not part of libgcc, only compiler-rt.
+  setLibcallName(RTLIB::MULO_I128, nullptr);
+
----------------
please, add a comment:
```
// TODO: Link compiler-rt's builtins by default in Clang once and for all
// See: https://github.com/llvm/llvm-project/issues/16778
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141836/new/

https://reviews.llvm.org/D141836



More information about the llvm-commits mailing list