[PATCH] D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 15:27:09 PST 2020


Carrot created this revision.
Herald added subscribers: pengfei, hiraditya.
Carrot requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Function isLegalMaskedGather should be queried when vectorizing a gather/scatter intrinsic/instruction, like LoopVectorize does in function setCostBasedWideningDecision. But SLPVectorize doesn't do this check, so it can even generate gather intrinsics on targets that don't support gather instructions, like x86 processor supports SSE but no AVX512.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92701

Files:
  llvm/include/llvm/Analysis/VectorUtils.h
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr47623.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92701.309677.patch
Type: text/x-patch
Size: 40957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201204/bb1d818a/attachment.bin>


More information about the llvm-commits mailing list