<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86205>86205</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
riscv popcount lowering shouldn't call __muldi3/__mulsi3
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
efriedma-quic
</td>
</tr>
</table>
<pre>
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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskt2umzAMx58m3FhFwSkFLrhYT8UTTNplFYgL3kLS5aPdefsJTqvdTIqcRHb-tn-OjpFnR9SL-izqS6FzWnzo6RaYzKoPvzNPxejNZ__hXWRDQahvQl6EfNuTfK39yi6BFthmt-sa-COwA9GcIVDKwcH1Oma2id317u-Tzy4JbLcgoc4gmst_Vb_sD04LHFYdpkWoS3goZIEfkBaOMJOjoBNF0DBpayF5uF7XbCOrEuD7FsMRLP8i-7k5R4Jo_XPLyjd4EhjvBDYJFv0gEIirQNzknwRx8dkayHE78i1FYBcTaVMWplemU50uqK-aqpJ1K1tVLL1sqMaaulZRp8i0nUYpp1vXVOOJjJEF9yjxKBVWWNXHoyplXU9Vg9U0jq1ucBRHSatmW1r7WEsf5oJjzNS3J5R1YfVINu5TQ3T0hN25lVxfitBvbw5jnqM4SssxxX8qiZOlPnCcHvAeAVj_pMBufrX6RWLnuEM0rAQOb55FDrZfUrrH7S_gIHCYOS15LCe_Chy2VK_tcA_-J01J4LAXGAUOewN_AwAA__9ULsaC">