mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[APInt] Remove unnecessary min with BitWidth from countTrailingOnesSlowCase.
The unused upper bits are guaranteed to be 0 so we don't need to worry about accidentally counting them. llvm-svn: 301091
This commit is contained in:
parent
8f48b8e5d1
commit
0b06a173ec
@ -688,7 +688,8 @@ unsigned APInt::countTrailingOnesSlowCase() const {
|
||||
Count += APINT_BITS_PER_WORD;
|
||||
if (i < getNumWords())
|
||||
Count += llvm::countTrailingOnes(pVal[i]);
|
||||
return std::min(Count, BitWidth);
|
||||
assert(Count <= BitWidth);
|
||||
return Count;
|
||||
}
|
||||
|
||||
unsigned APInt::countPopulationSlowCase() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user