aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-06-25 05:30:56 +0000
committerNadav Rotem <nrotem@apple.com>2013-06-25 05:30:56 +0000
commit58bf5ea452116e90ce7147ab2e32d40173dcc098 (patch)
treefb4ac7a262ae29d747040ef8a65674ac54651070 /lib
parentdd5af27a74a01f0d03356cea15d3a403f4964f8b (diff)
downloadexternal_llvm-58bf5ea452116e90ce7147ab2e32d40173dcc098.zip
external_llvm-58bf5ea452116e90ce7147ab2e32d40173dcc098.tar.gz
external_llvm-58bf5ea452116e90ce7147ab2e32d40173dcc098.tar.bz2
Fix a typo in the code that collected the costs recursively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6837e51..88bcd90 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -727,7 +727,7 @@ int FuncSLP::getTreeCost_rec(ArrayRef<Value *> VL, unsigned Depth) {
int Cost = getTreeCost_rec(Operands, Depth + 1);
if (Cost == MAX_COST)
return MAX_COST;
- TotalCost += TotalCost;
+ TotalCost += Cost;
}
// Calculate the cost of this instruction.