[PATCH] D21521: [X86][SSE] Add cost model for BSWAP of vectors

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 10:47:17 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: hfinkel, delena, mkuper, andreadb, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

The BSWAP of vector types is quite efficiently implemented using vector shuffles on SSE/AVX targets, we should reflect the typical cost of this to encourage vectorization.

Also, we're not making much use of the intrinsic costings on any target - for instance why do we not use this for CTPOP instead of the rather limited getPopcntSupport() approach? CTLZ/CTTZ would probably benefit as well.

Repository:
  rL LLVM

http://reviews.llvm.org/D21521

Files:
  lib/Target/X86/X86TargetTransformInfo.cpp
  test/Analysis/CostModel/X86/bswap.ll
  test/Analysis/CostModel/X86/scalarize.ll
  test/Transforms/SLPVectorizer/X86/bswap.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21521.61267.patch
Type: text/x-patch
Size: 31111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160620/781779b1/attachment.bin>


More information about the llvm-commits mailing list