[llvm] [KnownBits][APInt] Optimize isConstant (NFC) (PR #191919)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 19 09:57:26 PDT 2026


================
@@ -1268,6 +1268,14 @@ class [[nodiscard]] APInt {
     return isSubsetOfSlowCase(RHS);
   }
 
+  /// This operation checks if valid bits exclusively set in this APInt or RHS.
----------------
nikic wrote:

I find this doc comment unclear, esp wrt the actual implementation. From the doc comment, I'd assumes that this checks checks that no bit set in this is also set in RHS (due to "exclusively").

Something like this would be clearer?

> This operation checks if all bits are set in either this or RHS (or both).

https://github.com/llvm/llvm-project/pull/191919


More information about the llvm-commits mailing list