[llvm] [GlobalISel] Add G_ROTL/G_ROTR to computeNumSignBits (PR #213364)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 01:20:04 PDT 2026


================
@@ -485,6 +485,12 @@ struct KnownBits {
   /// Compute known bits for pdep(Val, Mask).
   LLVM_ABI static KnownBits pdep(const KnownBits &Val, const KnownBits &Mask);
 
+  /// Compute the number of sign bits after rotating a value.
+  LLVM_ABI static unsigned rotateNumSignBits(unsigned SrcSignBits,
+                                             unsigned BitWidth,
+                                             std::optional<uint64_t> RotAmt,
+                                             bool IsRotateRight);
----------------
RKSimon wrote:

Why are you dumping a non-KnownBits method inside KnownBits.h (and the KnownBits struct itself come to that!)?

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


More information about the llvm-commits mailing list