From c00e65aa893c45814bf2186de56b7e0f2d418a5c Mon Sep 17 00:00:00 2001 From: Cong Hou Date: Sun, 13 Dec 2015 17:00:25 +0000 Subject: Fix a type issue in r255455. Should not use unsigned type as std::abs()'s template type. llvm-svn: 255461 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') 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(Sum - BranchProbability::getDenominator()) <= + assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <= Probs.size() && "The sum of successors's probabilities exceeds one."); #endif // NDEBUG -- cgit v1.2.3