[PATCH] D148347: [AArch64] Handle vector with two different values
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 01:39:26 PDT 2023
jaykang10 added a comment.
In D148347#4287817 <https://reviews.llvm.org/D148347#4287817>, @efriedma wrote:
> You should probably add more testcases for coverage. Some 8 and 16-element cases using shuffles. Maybe a case of a 4-element vector (a,a,b,b) which can be built using dup+dup+concat.
>
> Some future areas to look at (not necessarily in this patch; I don't want to keep expanding the scope of this forever):
>
> mov+ins+ins+ins is never the optimal sequence for creating a 4-element vector with multiple elements with the same value; you can always use either dup+ins or dup+ins+ins. Maybe worth trying to optimize.
>
> It looks like the generic vector_shuffle code is generating suboptimal code in some cases because it doesn't realize the shuffle inputs are actually splats, so it can mess with the indices.
Thanks for good comment!
Let me add and check the test cases more.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148347/new/
https://reviews.llvm.org/D148347
More information about the llvm-commits
mailing list