[PATCH] D121044: [X86][TTI] `getReplicationShuffleCost()`: account for deduplication

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 5 02:43:05 PST 2022


lebedev.ri created this revision.
lebedev.ri added a reviewer: RKSimon.
lebedev.ri added a project: LLVM.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
lebedev.ri requested review of this revision.

Let's take a look at:
https://godbolt.org/z/4f6bv69hc

Even though it would seem that we need 4 shuffles there,
we only need two, because the replication factor is 2x the vector size,
so half of the vectors can be materialized via a `mov`e.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121044

Files:
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/X86/shuffle-replication-i64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121044.413207.patch
Type: text/x-patch
Size: 14668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220305/08896eaf/attachment.bin>


More information about the llvm-commits mailing list