Implement comparison operators for BranchProbability in a way that can't overflow...
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 24 Oct 2011 13:50:56 +0000 (13:50 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 24 Oct 2011 13:50:56 +0000 (13:50 +0000)
commit13b10731abfc006fce790c5c8205cd24c7d67de8
treeeb1a73b00a86c6246051239c5e58c7cb28c6b5ac
parentde1c9bb45017e25b5fc2b77e15d3c377f6572075
Implement comparison operators for BranchProbability in a way that can't overflow INT64_MAX.

Add a test case for the edge case that triggers this. Thanks to Chandler for bringing this to my attention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142794 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/BranchProbability.h
unittests/Support/BlockFrequencyTest.cpp