[llvm] [ADT] Add fshl/fshr operations to APInt (PR #153790)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 09:00:14 PDT 2025


================
@@ -3169,3 +3169,19 @@ APInt APIntOps::pow(const APInt &X, int64_t N) {
   }
   return Acc;
 }
+
+APInt llvm::APIntOps::fshl(const APInt &Hi, const APInt &Lo,
+                           const APInt &Shift) {
+  APInt BitWidth(
----------------
topperc wrote:

I don't think we need an APInt for BitWidth. `rotateModulo` in APInt.cpp doesn't.

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


More information about the llvm-commits mailing list