Fix a type issue in r255455. Should not use unsigned type as std::abs()'s template...
authorCong Hou <congh@google.com>
Sun, 13 Dec 2015 17:00:25 +0000 (17:00 +0000)
committerCong Hou <congh@google.com>
Sun, 13 Dec 2015 17:00:25 +0000 (17:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255461 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBasicBlock.cpp

index 4065afa95d710b326ef5feb95152bbcd968fa6cb..76099f28499bd6a794b48777a79979692e4d1479 100644 (file)
@@ -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.
   // 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
              Probs.size() &&
          "The sum of successors's probabilities exceeds one.");
 #endif // NDEBUG