summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index c0567a9f140..de3843c58d2 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1779,7 +1779,6 @@ int BoUpSLP::getSpillCost() {
PrevInst = Inst;
}
- DEBUG(dbgs() << "SLP: SpillCost=" << Cost << "\n");
return Cost;
}
@@ -1833,10 +1832,13 @@ int BoUpSLP::getTreeCost() {
TTI->getVectorInstrCost(Instruction::ExtractElement, VecTy, EU.Lane);
}
- Cost += getSpillCost();
+ int SpillCost = getSpillCost();
+ Cost += SpillCost + ExtractCost;
- DEBUG(dbgs() << "SLP: Total Cost " << Cost + ExtractCost<< ".\n");
- return Cost + ExtractCost;
+ DEBUG(dbgs() << "SLP: Spill Cost = " << SpillCost << ".\n"
+ << "SLP: Extract Cost = " << ExtractCost << ".\n"
+ << "SLP: Total Cost = " << Cost << ".\n");
+ return Cost;
}
int BoUpSLP::getGatherCost(Type *Ty) {
OpenPOWER on IntegriCloud