mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 00:36:06 +00:00
[ARM] Change getScalarizationOverhead overload used in gather costs. NFC
This changes which of the getScalarizationOverhead overloads is used in the gather/scatter cost to use the base variant directly, not relying on the version using heuristics on the number of args with no args provided. It should still produce the same costs for scalarized gathers/scatters.
This commit is contained in:
parent
a31eae8405
commit
e771614bae
@ -1416,8 +1416,9 @@ unsigned ARMTTIImpl::getGatherScatterOpCost(unsigned Opcode, Type *DataTy,
|
||||
unsigned VectorCost = NumElems * LT.first * ST->getMVEVectorCostFactor();
|
||||
// The scalarization cost should be a lot higher. We use the number of vector
|
||||
// elements plus the scalarization overhead.
|
||||
unsigned ScalarCost =
|
||||
NumElems * LT.first + BaseT::getScalarizationOverhead(VTy, {});
|
||||
unsigned ScalarCost = NumElems * LT.first +
|
||||
BaseT::getScalarizationOverhead(VTy, true, false) +
|
||||
BaseT::getScalarizationOverhead(VTy, false, true);
|
||||
|
||||
if (EltSize < 8 || Alignment < EltSize / 8)
|
||||
return ScalarCost;
|
||||
|
Loading…
x
Reference in New Issue
Block a user