diff options
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 4065afa95d7..76099f28499 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -515,7 +515,7 @@ void MachineBasicBlock::validateSuccProbs() const { // 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 |