[llvm] [LoopVectorize] Improve Vectorization of Low Trip Count Loops (PR #195823)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 00:42:48 PDT 2026
sdesmalen-arm wrote:
> > Thanks for checking. I lost track of the code-gen changes, I thought some (most?) landed already. Is there a summary somewhere what changes are needed?
>
> We have one change, #217006, which will allow v2i8 to use SVE for SVE targets, which does help. But in reality there is alot of work to do to get this improved across the board as my targeted SelectionDAG PR got pushback as it was not something we usually do in SelectionDAG.
I think #217006 should cover most of it, because at the point of promotion the inputs to an operation (e.g. `llvm.min`) are likely already promoted, so we just have to make sure that either the codegen for leaf nodes is good or that the cost-model for those is accurate. There will of course be some exceptions, but we can fix those up when we find them.
In terms of applicability of this PR, it only applies to loops with a low tripcount and a large loop body (if the loop body would have been smaller, the full unroller would have already unrolled it), so the impact of a few operations being undercosted is less likely to impact the overall cost significantly.
https://github.com/llvm/llvm-project/pull/195823
More information about the llvm-commits
mailing list