[PATCH] D53865: [LoopVectorizer] Improve computation of scalarization overhead.

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 13:38:29 PST 2018


hsaito added a comment.

As for the computation of the cost for scalarized instruction:

I think the TTI based per instruction cost should fully account for extract and insert. I don't think we should change that.

What we need to change is the caller side. If the instruction is scalarized, the base cost for it should be scalar exec cost * VF.
We should then add extract cost for each vector source (but only if not already accounted for for another scalar use site) and
insert cost if one or more of the uses is vector.


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

https://reviews.llvm.org/D53865





More information about the llvm-commits mailing list