[llvm] [KnownBits] Add operator<<=(unsigned) and operator>>=(unsigned). NFC (PR #155751)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 00:51:51 PDT 2025
================
@@ -487,6 +487,20 @@ struct KnownBits {
/// Update known bits based on XORing with RHS.
LLVM_ABI KnownBits &operator^=(const KnownBits &RHS);
+ /// Shift known bits left by ShAmt. Shift in bits are unknown.
+ KnownBits &operator<<=(unsigned ShAmt) {
----------------
jayfoad wrote:
This breaks the convention that `KnownBits::operatorXX` corresponds to doing `operatorXX` on the underlying value -- if we followed that convention then this operator would shift in known zeros.
https://github.com/llvm/llvm-project/pull/155751
More information about the llvm-commits
mailing list