git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255461
91177308-0d34-0410-b5e6-
96231b3b80d8
// Due to precision issue, we assume that the sum of probabilities is one if
// the difference between the sum of their numerators and the denominator is
// no greater than the number of successors.
- assert(std::abs<uint64_t>(Sum - BranchProbability::getDenominator()) <=
+ assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <=
Probs.size() &&
"The sum of successors's probabilities exceeds one.");
#endif // NDEBUG