<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/144520>144520</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RISCV] Enable loop vectorizer register pressure VF pruning again
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:RISC-V
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
lukel97
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lukel97
</td>
</tr>
</table>
<pre>
After https://github.com/llvm/llvm-project/pull/132190 we fixed the issue with spilling on https://godbolt.org/z/WcbWGooa4 since we were now pruning VFs that had too high a register pressure, even if `TTI::shouldMaximizeVectorBandwidth` was false.
However this caused some regressions on AArch64 so it was reverted back to only pruning when vector bandwidth was maximized in #141736. This causes the above link to spill again.
We should find a way to enable this pruning again on RISC-V, which may just be a matter of enabling `TTI::shouldMaximizeVectorBandwidth`. We'll need to double check that it doesn't actually cause more spilling in practice.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU09vvDYU_DTm8vRDYPMne-BAktLm0Esb7Z4NfmAnxka2WbL59JXZ3URtTzkhIb95M_NmuPdqMogNKR8JpXp9R32oCaWkfE74GqR1ze1n0ltxadoxoAMZwuIJawntCO0mFeTap4OdCe20Pt8_vxZn33AIhHbLqjWhXc5ofshgQxjVBwoIEkF5vyJsKkjwi9JamQms-e8KK3qrQ2rdRGj3SWh3GvrT79byArwyA0bMDR2CsRssbjUR5th5CJIHkFxAsBakmiRwcDgpH3UsDr1fHRL6BHhGA2oEUmWvry9xM2u9tKsWf_IPNatPPOIQrHvkRmxKBEmqDDbuYeTaY0qylmTtH3bDMzoIUnkY-OpRgLczxpVxl7LGR3Vt6wZZFeAtqLCjuDgXUEDPh3cIFqzRly8lm0QD530_9HcC-9x8IydAGSCU5UVesyqF1y8GfreZ9_aMoJXZwXengU9cmRvzE8JVLYzKCOCw8Ut8iYb3Gq-C7mz2uSjjr5e_n34do3ubVIOEmV_gbfUBegQOMw_RZDteQeLkT8xN4YSE1lqDwZgVC8KukcsgMVoUD6sCCIveEFoH4ENYudaXq2yYrcPvSCkDi-NDUAOmiWiYOLADT7DJ6zLLK5YXdSIbxmjds2LkfV1W1cjHkdXiIS_H8aHGfCwS1dCMllmV1zmlZVGnVYHVQdSsp4w_FDUjRYYzVzqNBYhxTfZ8N3lRlDRLNO9R-1vb4qXRCMLau4977Vyzl6dfJ0-KTCsf_DdaUEHvbY0jR1I-w2_XA2lrl1tC1Ce6_2ccjt2_D5isTjc_bvIux8cuXxWdG_pPAAAA__8C9G-_">