[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 14:17:59 PDT 2015
congh added a comment.
In http://reviews.llvm.org/D12295#233554, @rengolin wrote:
> In http://reviews.llvm.org/D12295#233532, @congh wrote:
>
> > 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?
>
>
> If the problem was found with a test case, then yes. But if it was just you fiddling with internal constants, I think the patch is obvious and should be ok without a test.
This should be the latter case. Thanks for the review!
http://reviews.llvm.org/D12295
More information about the llvm-commits
mailing list