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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 08:03:25 PDT 2026


================
@@ -590,6 +590,11 @@ struct KnownBits {
   static KnownBits remGetLowBits(const KnownBits &LHS, const KnownBits &RHS);
 };
 
+/// Compute the number of sign bits after rotating a value.
+LLVM_ABI unsigned rotateNumSignBits(unsigned SrcSignBits, unsigned BitWidth,
----------------
RKSimon wrote:

can we put this in a llvm::SignBitsOps namespace and just call this rot() ?

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


More information about the llvm-commits mailing list