[PATCH] D93122: [TTI] Use shuffle cost in getInterleavedMemoryOpCost, if profitable.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 08:29:16 PST 2020


fhahn created this revision.
fhahn added reviewers: RKSimon, spatel, dmgreen.
fhahn requested review of this revision.
Herald added a project: LLVM.

Currently BasicTTIImpl::getInterleavedMemoryOpCost computes the cost of
the shuffles to extract/pack sub-vectors for interleave groups as the
cost of inserting/extracting all elements individually. This
over-estimates the cost in cases where the cost of the actual shuffle is
lower.

This patch also computes the cost for the shuffle using getShuffleCost
and picks the minimum. The extract/insert combination can be cheaper
than shuffles, e.g. if there are many gaps in the group.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93122

Files:
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/test/Transforms/LoopVectorize/X86/interleaving.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93122.311230.patch
Type: text/x-patch
Size: 16027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201211/a1a5648c/attachment.bin>


More information about the llvm-commits mailing list