From 58bf5ea452116e90ce7147ab2e32d40173dcc098 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Tue, 25 Jun 2013 05:30:56 +0000 Subject: [PATCH] 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 --- lib/Transforms/Vectorize/SLPVectorizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.11.0