[PATCH] D93122: [TTI] Use shuffle cost in getInterleavedMemoryOpCost, if profitable.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 09:55:24 PST 2021


fhahn added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1165
+      Cost += std::min(ShuffleCost, InsertExtractCost);
     }
 
----------------
RKSimon wrote:
> Wouldn't trying getScalarizationOverhead be a better approach?
I think we could use `getScalarizationOverhead` for the ExtractElement/InsertElement variants, but I am not sure if that would be more compact. AFAICT  `getScalarizationOverhead` currently only considers the case when each element  is either available in a scalar (insertion) or is used as a scalar (extraction). 

The new case here is slightly different, because we break down a larger vector into a smaller one or vice-versa.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93122



More information about the llvm-commits mailing list