[AARCH64] Enable STORE of v4i8 to help more vectorization opportunities
authorGuozhi Wei <carrot@google.com>
Fri, 31 Mar 2023 16:58:41 +0000 (16:58 +0000)
committerGuozhi Wei <carrot@google.com>
Fri, 31 Mar 2023 17:03:06 +0000 (17:03 +0000)
commita72162cc529cbfb6587176332b9421fbfb638936
tree712f6ba0096fb3a6cabaced37af643a6ab592f0d
parentbe91b4e3f4f9b13b16f8482d9bfd9734898e52e1
[AARCH64] Enable STORE of v4i8 to help more vectorization opportunities

For the attached test case, currently llvm generates instructions to load/or/store the bytes one by one. Although NEON doesn't support v4i8 natively, we can promote it to v4i16 and operate on v4i16 vectors. So this patch override getStoreMinimumVF and specify the minimum VF for i8 vector is v4i8.

Differential Revision: https://reviews.llvm.org/D145614
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/test/Transforms/SLPVectorizer/AArch64/32-bit.ll [new file with mode: 0644]
llvm/test/Transforms/SLPVectorizer/AArch64/vectorizable-selects-uniform-cmps.ll