Remove an incorrect assert during branch weight propagation.

Patch and test case by Alastair Murray!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2012-09-08 00:07:26 +00:00
parent 3adf3b0ac0
commit a344341849
2 changed files with 37 additions and 1 deletions

View File

@@ -929,7 +929,6 @@ bool SimplifyCFGOpt::FoldValueComparisonIntoPredecessors(TerminatorInst *TI,
GetWeight(TI, i)->getValue().getZExtValue());
} else if (PredHasWeights) {
// Split the old default's weight amongst the children
assert(PredDefaultWeight != 0);
Weights.push_back(PredDefaultWeight / (1 + BBCases.size()));
}
}