[llvm] r229290 - Enabled cost calculation for masked memory operations.
Elena Demikhovsky
elena.demikhovsky at intel.com
Sun Feb 15 00:08:49 PST 2015
Author: delena
Date: Sun Feb 15 02:08:48 2015
New Revision: 229290
URL: http://llvm.org/viewvc/llvm-project?rev=229290&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=229290&r1=229289&r2=229290&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Sun Feb 15 02:08:48 2015
@@ -4912,7 +4912,11 @@ LoopVectorizationCostModel::getInstructi
// 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,
More information about the llvm-commits
mailing list