[llvm] [SLP] Pessimistically handle unknown vector entries in SLP vectorizer (PR #75438)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 04:39:48 PST 2023
alexey-bataev wrote:
> > Ok, let's fix it this way for now, later need to teach getInsertIndex to separate representation for undef/runtime indices
>
> Alright. Thank you for your review.
>
> Also, while analyzing the issue. I figured there were cases where SLP inserts seemingly redundant shuffles. For example here:
>
> 
>
> `%122` on the left is replaced by 3 shuffles. The last two shuffles expand (`%128`) and merge (`%129`) the vector, however the first shuffle (`%127`) is not being referenced anywhere else in the remaining code (that I can unfortunately not screenshot).
>
> While the redundant shuffle will eventually be removed later by DCE, I am still curious, is there a known reason this happens?
2 of these shuffles are free,they are just identity resizing shuffles, so it is not a big issue + they will optimized later. Yes, this can be improved, working on this. It may help if you can provide the reproducer
https://github.com/llvm/llvm-project/pull/75438
More information about the llvm-commits
mailing list