diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2025-05-21 13:19:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-21 13:19:09 -0700 |
commit | a76bf4da53182baace54fd69f9d38fc10e6b8e85 (patch) | |
tree | 0bddac47325742f488ab7fa8ee2e260a33d921d0 /llvm/lib/Support/APInt.cpp | |
parent | 89d9a83b704a8f6b5bd64dac93095a9228c601d5 (diff) | |
download | llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.zip llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.tar.gz llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.tar.bz2 |
[NFC][ADT/Support] Add {} for else when if body has {} (#140758)
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 0119cb2..4743a039 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -878,15 +878,14 @@ APInt llvm::APIntOps::RoundDoubleToAPInt(double Double, unsigned width) { /// | 1[63] 11[62-52] 52[51-00] 1023 | /// -------------------------------------- double APInt::roundToDouble(bool isSigned) const { - // Handle the simple case where the value is contained in one uint64_t. // It is wrong to optimize getWord(0) to VAL; there might be more than one word. if (isSingleWord() || getActiveBits() <= APINT_BITS_PER_WORD) { if (isSigned) { int64_t sext = SignExtend64(getWord(0), BitWidth); return double(sext); - } else - return double(getWord(0)); + } + return double(getWord(0)); } // Determine if the value is negative. @@ -2578,8 +2577,9 @@ int APInt::tcMultiplyPart(WordType *dst, const WordType *src, if (low + dst[i] < low) high++; dst[i] += low; - } else + } else { dst[i] = low; + } carry = high; } |