[PATCH] D148801: [SLP][X86]Fix the cost of reused gathers/buildvectors and floats insert.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 06:47:37 PDT 2023


ABataev created this revision.
ABataev added reviewers: RKSimon, vporpo, vdmitrie.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
ABataev requested review of this revision.
Herald added a subscriber: pcwang-thead.
Herald added a project: LLVM.

There are 2 problems in the cost estimation for buildvector/gather.

1. If the buildvector/gather node is the same as another one node, need to estimate the cost of this node as 0.
2. The cost of inserting float point register to non-poison vector is not 0, it should not be considered free.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148801

Files:
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Analysis/CostModel/X86/vector-insert-value.ll
  llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
  llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148801.515311.patch
Type: text/x-patch
Size: 39643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230420/6c30e51f/attachment.bin>


More information about the llvm-commits mailing list