[llvm] [SDag][ARM][RISCV] Allow lowering CTPOP into a libcall (PR #101786)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 21:30:09 PDT 2025
s-barannikov wrote:
Thanks,
Looking at `lib/math/div64.c`, I see calls to [`__builtin_ctzll`](https://github.com/torvalds/linux/blob/a79be02bba5c31f967885c7f3bf3a756d77d11d9/lib/math/div64.c#L222) and [`__builtin_clzll`](https://github.com/torvalds/linux/blob/a79be02bba5c31f967885c7f3bf3a756d77d11d9/lib/math/div64.c#L243C10-L243C25). They should be expanded into some math and a `__popcountdi2` call. Are these calls supposed to be inlined by the compiler or does linux kernel provide `__ctzdi2` / `__clzdi2`?
https://github.com/llvm/llvm-project/pull/101786
More information about the llvm-commits
mailing list