diff options
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
| -rw-r--r-- | llvm/lib/Support/APInt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 95b8345b9c6..9bb364af279 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -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 { |

