[llvm] [SDag][ARM][RISCV] Allow lowering CTPOP into a libcall (PR #99752)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 12:31:18 PDT 2024


s-barannikov wrote:

The reversal made the bots green.

I think I understood what the issue is. All popcount libcalls returns `int`, but ISD::CTPOP returns the type of the argument, which can be larger. In type legalizer I need to pass the correct return type to `makeLibCall` and sign-extend the result afterwards.

I'll revert the rest of the patch because the issue should affect RISC-V as well.


https://github.com/llvm/llvm-project/pull/99752


More information about the llvm-commits mailing list