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

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 12:04:22 PST 2023


rengolin added a comment.

In D141836#4074521 <https://reviews.llvm.org/D141836#4074521>, @echristo wrote:

> The right move here is to check about muloti, not disable it unless the
> aarch64 backend doesn't need it.

You mean `__has_builtin`?

The problem is that LLVM itself lowers the call for generic code, because it thinks there is support (since the target reports there is), so users can't do much to avoid it.

This "fix" is just telling LLVM there isn't such call, and so it lowers to standard arithmetic. Checking clang is linking RT is not fool-proof either (multi-stage compilation).

My view is that it's wrong to say we have that builtin when it's possible not to have, so I'd err in the side of caution and only re-enable it when we make sure we know when it's safe to lower.

In the end, the generated code is probably a bit worse than the implemented one, but still works, so it won't break anything.


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