[PATCH] D110713: [TTI] BasicTTI::getInterleavedMemoryOpCost(): use getScalarizationOverhead()
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 08:28:19 PDT 2021
RKSimon added a comment.
cheers - it seems to be enough to cause an actual test change so is at least going in the right direction. A better step would be to get this converted to shuffle costs, but we have really poor handling of length changing shuffles
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1257
// <8 x i32> vector and insert them into a <4 x i32> vector.
- for (unsigned Index : Indices) {
- assert(Index < Factor && "Invalid index for interleaved memory op");
-
- // Extract elements from loaded vector for each sub vector.
- for (unsigned Elm = 0; Elm < NumSubElts; Elm++)
- Cost += thisT()->getVectorInstrCost(Instruction::ExtractElement, VT,
- Index + Elm * Factor);
- }
-
- InstructionCost InsSubCost = 0;
- for (unsigned Elm = 0; Elm < NumSubElts; Elm++)
- InsSubCost +=
- thisT()->getVectorInstrCost(Instruction::InsertElement, SubVT, Elm);
-
+ InstructionCost InsSubCost = getScalarizationOverhead(SubVT, true, false);
Cost += Indices.size() * InsSubCost;
----------------
lebedev.ri wrote:
> Please can you name the bool params?
yes I'll add them
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110713/new/
https://reviews.llvm.org/D110713
More information about the llvm-commits
mailing list