[PATCH] D144128: [SLP] Check with target before vectorizing GEP Indices

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 10:59:46 PST 2023


jonpa created this revision.
jonpa added reviewers: uweigand, ABataev.
Herald added subscribers: vporpo, ctetreau, pengfei, hiraditya, kristof.beyls.
Herald added a project: All.
jonpa requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

The target hook prefersVectorizedAddressing() already exists to check with target if address computations should be vectorized, so it seems like this could be used in SLPVectorizer as well.

This gives some changes on SystemZ, but it doesn't seem to matter much (on SPEC). Some ~100 less (expensive) extractions into address registers.

Some test changes on AArch64 and X86, have not looked into them, but it seems these subtargets now change when "gather" is unsupported, which makes sense, I think.


https://reviews.llvm.org/D144128

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/ext-trunc.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/gather-reduce.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
  llvm/test/Transforms/SLPVectorizer/SystemZ/gep-indices.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
  llvm/test/Transforms/SLPVectorizer/X86/minimum-sizes.ll
  llvm/test/Transforms/SLPVectorizer/X86/opaque-ptr.ll
  llvm/test/Transforms/SLPVectorizer/X86/partail.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144128.497745.patch
Type: text/x-patch
Size: 89264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230215/2d6740ff/attachment-0001.bin>


More information about the llvm-commits mailing list