[PATCH] D148347: [AArch64] Handle vector with two different values

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 00:04:08 PDT 2023

jaykang10 added a comment.

> I haven't thought through how to optimize the cases where some non-VSELECT shuffle is optimal.  We don't have any existing code to handle splat operands to shuffles.  I guess to start, you could just check for specific patterns before creating the VSELECT.  Alternatively, might make sense to make a VECTOR_SHUFFLE, then teach shuffle lowering to handle the relevant patterns.

Thanks for good comment.
It looks it is not easy to generate the vector mask simply for vselect and vector_shuffle because it needs build_vector again...
Let me check the specific patterns + (vselect or vector_shuffle) more.

>> I have seen the constant pool and load...and I was not sure it is good enough or not...
> Better than a long sequence of MOVs.  And if there's a loop, the load may get hoisted out.

I agree with you.



More information about the llvm-commits mailing list