[PATCH] D70607: [x86] make SLM extract vector element more expensive than default

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 10:53:00 PST 2019


spatel created this revision.
spatel added reviewers: craig.topper, RKSimon, ABataev.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

I'm not sure what the effect of this change will be on all of the affected tests or a larger benchmark, but it fixes the horizontal add/sub problems noted here:
https://reviews.llvm.org/D59710?vs=227972&id=228095&whitespace=ignore-most#toc

The costs are based on reciprocal throughput numbers in Agner's tables for PEXTR*; these appear to be very slow ops on Silvermont.

This is a small step towards the larger motivation discussed in PR43605:
https://bugs.llvm.org/show_bug.cgi?id=43605

Also, it seems likely that insert/extract is the source of perf regressions on other CPUs (up to 30%) that were cited as part of the reason to revert D59710 <https://reviews.llvm.org/D59710>, so maybe we'll extend the table-based approach to other subtargets.


https://reviews.llvm.org/D70607

Files:
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/X86/fptosi.ll
  llvm/test/Analysis/CostModel/X86/fptoui.ll
  llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector.ll
  llvm/test/Analysis/CostModel/X86/vector-extract.ll
  llvm/test/Transforms/LoopVectorize/X86/interleaving.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-cast.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
  llvm/test/Transforms/SLPVectorizer/X86/hadd.ll
  llvm/test/Transforms/SLPVectorizer/X86/hsub.ll
  llvm/test/Transforms/SLPVectorizer/X86/sext.ll
  llvm/test/Transforms/SLPVectorizer/X86/zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70607.230685.patch
Type: text/x-patch
Size: 377494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191122/c7866844/attachment-0001.bin>


More information about the llvm-commits mailing list