forked from OSchip/llvm-project
Enabled cost calculation for masked memory operations.
We already have implementation for cost calculation for masked memory operations. I just call it from the loop vectorizer. llvm-svn: 229290
This commit is contained in:
parent
c3cd8564eb
commit
6f5a859633
|
@ -4912,7 +4912,11 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) {
|
|||
|
||||
// Wide load/stores.
|
||||
unsigned Cost = TTI.getAddressComputationCost(VectorTy);
|
||||
Cost += TTI.getMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS);
|
||||
if (Legal->isMaskRequired(I))
|
||||
Cost += TTI.getMaskedMemoryOpCost(I->getOpcode(), VectorTy, Alignment,
|
||||
AS);
|
||||
else
|
||||
Cost += TTI.getMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS);
|
||||
|
||||
if (Reverse)
|
||||
Cost += TTI.getShuffleCost(TargetTransformInfo::SK_Reverse,
|
||||
|
|
Loading…
Reference in New Issue