[llvm] [AArch64] Add @llvm.experimental.vector.match (PR #101974)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 04:45:06 PDT 2024
rj-jesus wrote:
Hi @paulwalker-arm, I think we shouldn't necessarily assume the needle vectors will be small. I was planning to use the intrinsic to help with vectorising [`std::find_first_of`](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__algorithm/find_first_of.h#L24). Since MATCH supports up to 16 simultaneous comparisons per segment, I can see us wanting to support needle vectors with up to 16 elements. For these cases, with stock LLVM IR, we'd need around 16 splats, 16 CMEQs, and 15 ORRs. While it's feasible to match this later and lower it to a MATCH, I think it might be a bit cumbersome to do so (more so if we consider the multiple ways in which the ORR reduction chains may be implemented). I'm not opposed to this, but I think it might not be that straightforward. What do you think? Am I missing anything?
https://github.com/llvm/llvm-project/pull/101974
More information about the llvm-commits
mailing list