[llvm] r363492 - [BranchProbability] Delete a redundant overflow check
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 15 03:09:59 PDT 2019
Author: maskray
Date: Sat Jun 15 03:09:59 2019
New Revision: 363492
URL: http://llvm.org/viewvc/llvm-project?rev=363492&view=rev
Log:
[BranchProbability] Delete a redundant overflow check
Modified:
llvm/trunk/lib/Support/BranchProbability.cpp
Modified: llvm/trunk/lib/Support/BranchProbability.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/BranchProbability.cpp?rev=363492&r1=363491&r2=363492&view=diff
==============================================================================
--- llvm/trunk/lib/Support/BranchProbability.cpp (original)
+++ llvm/trunk/lib/Support/BranchProbability.cpp Sat Jun 15 03:09:59 2019
@@ -88,10 +88,6 @@ static uint64_t scale(uint64_t Num, uint
// 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;
More information about the llvm-commits
mailing list