<div dir="auto">The right move here is to check about muloti, not disable it unless the aarch64 backend doesn't need it. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 23, 2023, 10:11 AM Renato Golin via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rengolin added a subscriber: echristo.<br>
rengolin added a comment.<br>
<br>
In D141836#4073296 <<a href="https://reviews.llvm.org/D141836#4073296" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D141836#4073296</a>>, @sebastianpoeplau wrote:<br>
<br>
>> From reading the thread on <a href="https://github.com/llvm/llvm-project/issues/16778" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/issues/16778</a> (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.<br>
><br>
> That's my understanding as well.<br>
<br>
Every few years I come to this issue via bugs or reviews. I am shocked that this is still an issue today...<br>
<br>
This isn't by far a good solution, but it will work around the "original" problem, just not the "actual" problem.<br>
<br>
I don't mind this going in as is, but I'll let @nickdesaulniers approve to be sure I'm not missing anything.<br>
<br>
@echristo FYI<br>
<br>
<br>
<br>
================<br>
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:607<br>
+  // The MULO libcall is not part of libgcc, only compiler-rt.<br>
+  setLibcallName(RTLIB::MULO_I128, nullptr);<br>
+<br>
----------------<br>
please, add a comment:<br>
```<br>
// TODO: Link compiler-rt's builtins by default in Clang once and for all<br>
// See: <a href="https://github.com/llvm/llvm-project/issues/16778" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/issues/16778</a><br>
```<br>
<br>
<br>
Repository:<br>
  rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D141836/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D141836/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D141836" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D141836</a><br>
<br>
</blockquote></div>