File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1657,6 +1657,9 @@ class LoopVectorizationCostModel {
16571657 // / element)
16581658 InstructionCost getUniformMemOpCost (Instruction *I, ElementCount VF);
16591659
1660+ // / The cost computation for strided load/store instruction.
1661+ InstructionCost getStridedLoadStoreCost (Instruction *I, ElementCount VF);
1662+
16601663 // / Estimate the overhead of scalarizing an instruction. This is a
16611664 // / convenience wrapper for the type-based getScalarizationOverhead API.
16621665 InstructionCost getScalarizationOverhead (Instruction *I,
@@ -5825,6 +5828,19 @@ LoopVectorizationCostModel::getInterleaveGroupCost(Instruction *I,
58255828 return Cost;
58265829}
58275830
5831+ InstructionCost
5832+ LoopVectorizationCostModel::getStridedLoadStoreCost (Instruction *I,
5833+ ElementCount VF) {
5834+ Type *ValTy = getLoadStoreType (I);
5835+ auto *VectorTy = cast<VectorType>(toVectorTy (ValTy, VF));
5836+ const Align Alignment = getLoadStoreAlignment (I);
5837+ const Value *Ptr = getLoadStorePointerOperand (I);
5838+
5839+ return TTI.getStridedMemoryOpCost (I->getOpcode (), VectorTy, Ptr,
5840+ Legal->isMaskRequired (I), Alignment,
5841+ CostKind, I);
5842+ }
5843+
58285844std::optional<InstructionCost>
58295845LoopVectorizationCostModel::getReductionPatternCost (Instruction *I,
58305846 ElementCount VF,
You can’t perform that action at this time.
0 commit comments