[PATCH] D44742: [SLP] Stop counting cost of gather sequences with multiple uses

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 09:28:29 PDT 2018


mssimpso created this revision.
mssimpso added reviewers: ABataev, mkuper, Ayal.
Herald added a subscriber: javed.absar.

When building the SLP tree, we look for reuse among the vectorized tree entries. However, each gather sequence is represented by a unique tree entry, even though the sequence may be identical to another one. This means, for example, that a gather sequence with two uses will be counted twice when computing the cost of the tree. We should only count the cost of the definition of a gather sequence rather than its uses. During code generation, the redundant gather sequences are emitted, but we optimize them away with CSE. So it looks like this problem just affects the cost model.


Repository:
  rL LLVM

https://reviews.llvm.org/D44742

Files:
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Transforms/SLPVectorizer/AArch64/gather-cost.ll
  test/Transforms/SLPVectorizer/X86/blending-shuffle.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44742.139309.patch
Type: text/x-patch
Size: 5800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180321/037b94b0/attachment.bin>


More information about the llvm-commits mailing list