diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2025-05-22 21:52:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-22 21:52:59 +0100 |
commit | 23f0fbf8fff563c77f770f83096b522c3c99a82d (patch) | |
tree | 4dd9d286603682f038daa1b7ba4348e835020839 /llvm/lib/Support/APInt.cpp | |
parent | 3ea2cec7324e1e4569cd15b9e6cb1a4a6e8aa521 (diff) | |
download | llvm-23f0fbf8fff563c77f770f83096b522c3c99a82d.zip llvm-23f0fbf8fff563c77f770f83096b522c3c99a82d.tar.gz llvm-23f0fbf8fff563c77f770f83096b522c3c99a82d.tar.bz2 |
[APInt] APInt::clearBitsSlowCase - fix cut+paste typo when merging lo/himasks (#141108)
Fixes #141098
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 4743a039..954af7f 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -349,9 +349,9 @@ void APInt::clearBitsSlowCase(unsigned LoBit, unsigned HiBit) { // Create a high mask with ones above HiBit. uint64_t HiMask = ~(WORDTYPE_MAX >> (APINT_BITS_PER_WORD - HiShiftAmt)); // If LoWord and HiWord are equal, then we combine the masks. Otherwise, - // set the bits in HiWord. + // clear the bits in HiWord. if (HiWord == LoWord) - LoMask &= HiMask; + LoMask |= HiMask; else U.pVal[HiWord] &= HiMask; } |