[PATCH] D99980: [SLP]Improve cost model for the vectorized extractelements.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 11:09:48 PDT 2021


ABataev created this revision.
ABataev added reviewers: spatel, RKSimon, dtemirbulatov, anton-afanasyev, vdmitrie.
Herald added a subscriber: hiraditya.
ABataev requested review of this revision.
Herald added a project: LLVM.

1. No need to call `areAllUsersVectorized` as later the cost is calculated only if the instruction has one use and gets vectorized.
2. Need to calculate the cost of the dead extractelement more precisely, taking the vector type of the vector operand, not the resulting vector type.

Part of D57059 <https://reviews.llvm.org/D57059>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99980

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll
  llvm/test/Transforms/SLPVectorizer/X86/extractelement.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99980.335602.patch
Type: text/x-patch
Size: 9611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210406/7c06eb9f/attachment.bin>


More information about the llvm-commits mailing list