diff options
author | Cong Hou <congh@google.com> | 2015-08-26 23:17:52 +0000 |
---|---|---|
committer | Cong Hou <congh@google.com> | 2015-08-26 23:17:52 +0000 |
commit | b5ef475e5c5256c93f3d869dac672a8ddeaba383 (patch) | |
tree | 24b65cc06880b7f78290fe868d0823b9304eb375 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 28690925ed8318d7024d417e45902a23841d03df (diff) | |
download | llvm-b5ef475e5c5256c93f3d869dac672a8ddeaba383.zip llvm-b5ef475e5c5256c93f3d869dac672a8ddeaba383.tar.gz llvm-b5ef475e5c5256c93f3d869dac672a8ddeaba383.tar.bz2 |
[ARM] Use BranchProbability::scale() to scale an integer with a probability in ARMBaseInstrInfo.cpp,
Previously in isProfitableToIfCvt() in ARMBaseInstrInfo.cpp, the multiplication between an integer and a branch probability is done manually in an unsafe way that may lead to overflow. This patch corrects those cases by using BranchProbability's member function scale() to avoid overflow (which stores the intermediate result in int64).
Differential Revision: http://reviews.llvm.org/D12295
llvm-svn: 246106
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions