diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index ddf78a2ac0c..a5a0a98f5a1 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/lib/Analysis/InlineCost.cpp @@ -87,8 +87,8 @@ unsigned InlineCostAnalyzer::FunctionInfo:: Reduction += 10; else if (GetElementPtrInst *GEP = dyn_cast(I)) { // If the GEP has variable indices, we won't be able to do much with it. - if (!GEP->hasAllConstantIndices()) - Reduction += CountCodeReductionForAlloca(GEP)+15; + if (GEP->hasAllConstantIndices()) + Reduction += CountCodeReductionForAlloca(GEP); } else { // If there is some other strange instruction, we're not going to be able // to do much if we inline this.