[PATCH] D12295: Use BranchProbability::scale() to scale an integer with a probability in ARMBaseInstrInfo.cpp,
Cong Hou via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 13:32:27 PDT 2015
congh added a comment.
In http://reviews.llvm.org/D12295#233374, @rengolin wrote:
> This looks sane to me. Do you have a code where it fails? Would it be possible to turn into a test?
When the probability is represented with a very large numerator, we will get overflow here (this happened to me when I changed the representation of the BranchProbability by using a very large fixed denominator). BranchProbability provides scale() interface just for this case, so using it should be the right way to scale an integer. Is a test necessary for this fix?
http://reviews.llvm.org/D12295
More information about the llvm-commits
mailing list