llvm-project
llvm-project copied to clipboard
riscv popcount lowering shouldn't call __muldi3/__mulsi3
Consider:
int a(unsigned x) { return __builtin_popcount(x); }
With -march=rv32i, this generates a call to __mulsi3. This is likely to be slow; if we don't have "m", we should use shifts instead.