[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 07:26:39 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:
> Ideally
Well, that's an opinion... Personally I like the ergonomics of `operator&` etc and would have liked to use it in more cases like `operator+` instead of `add`, but that didn't work out because those functions needed extra arguments.
Anyway please don't consider my comments as blocking. I don't really object to the patch.
https://github.com/llvm/llvm-project/pull/155751
More information about the llvm-commits
mailing list