From: Nadav Rotem Date: Tue, 25 Jun 2013 05:30:56 +0000 (+0000) Subject: Fix a typo in the code that collected the costs recursively. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=58bf5ea452116e90ce7147ab2e32d40173dcc098;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index 6837e51c9a6..88bcd90839e 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -727,7 +727,7 @@ int FuncSLP::getTreeCost_rec(ArrayRef 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.