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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229290 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Elena Demikhovsky 2015-02-15 08:08:48 +00:00
parent 9bb36ed8d8
commit cc64d95696

View File

@ -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,