[PATCH] D78216: [TTI] Add DemandedElts to getScalarizationOverhead

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 15:39:42 PDT 2020


vdmitrie added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7019
   do {
+    // TODO - Convert this to use getScalarizationOverhead.
     Value *InsertedOperand;
----------------
This sounds like a simple machinery task while it is not. I was trying to explain the underlying issue in D76956. The problem is that we have a bias in cost model toward favoring vectorization for longer vectors and if we fix just this place the bias will be much more severe.  Since this patch effectively replaces 76956  I'm perfectly fine in a case if you decide to borrow/adopt my comment. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78216/new/

https://reviews.llvm.org/D78216





More information about the llvm-commits mailing list