projects
/
llvm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b435405
)
[BranchProbability] Delete a redundant overflow check
author
Fangrui Song
<maskray@google.com>
Sat, 15 Jun 2019 10:09:59 +0000
(10:09 +0000)
committer
Fangrui Song
<maskray@google.com>
Sat, 15 Jun 2019 10:09:59 +0000
(10:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363492
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/BranchProbability.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/BranchProbability.cpp
b/lib/Support/BranchProbability.cpp
index bb608da16c174d2ca1f5af6e54b7c8db93ab15c4..195e2d58d8e191f82a67c2c1b110fd73515d8c7d 100644
(file)
--- a/
lib/Support/BranchProbability.cpp
+++ b/
lib/Support/BranchProbability.cpp
@@
-88,10
+88,6
@@
static uint64_t scale(uint64_t Num, uint32_t N, uint32_t D) {
// Carry.
Upper32 += Mid32 < Mid32Partial;
- // Check for overflow.
- if (Upper32 >= D)
- return UINT64_MAX;
-
uint64_t Rem = (uint64_t(Upper32) << 32) | Mid32;
uint64_t UpperQ = Rem / D;